UNPKG

596 BTypeScriptView Raw
1import type { ScrollBlot } from 'parchment';
2import { EmbedBlot } from 'parchment';
3export interface EmbedContextRange {
4 startNode: Node | Text;
5 startOffset: number;
6 endNode?: Node | Text;
7 endOffset?: number;
8}
9declare class Embed extends EmbedBlot {
10 contentNode: HTMLSpanElement;
11 leftGuard: Text;
12 rightGuard: Text;
13 constructor(scroll: ScrollBlot, node: Node);
14 index(node: Node, offset: number): number;
15 restore(node: Text): EmbedContextRange | null;
16 update(mutations: MutationRecord[], context: Record<string, unknown>): void;
17}
18export default Embed;