docs/Script API/interfaces/Frontend_Script_API._internal_.TextEditor.html
interface TextEditor {
conversion: {
for(
filter: string,
): {
markerToHighlight(
data: { model: string; view: (data: { markerName: string }) => void },
): any;
};
};
data: {
processor: { toView(html: string): any };
toModel(viewFeragment: any): any;
};
editing: {
view: {
document: {
getRoot(): CKNode;
on(
event: string,
cb: (event: CKEvent, data: { preventDefault(): any }) => void,
opts?: { priority: "high" },
): any;
};
domRoots: { values: () => { next: () => { value: string } } };
change(cb: (writer: Writer) => void): any;
focus(): void;
scrollToTheSelection(): void;
};
};
model: {
document: {
differ: {
getChanges(): {
name: string;
position?: { nodeAfter?: CKNode; parent: CKNode; toJSON(): Object };
type: string;
}[];
};
selection: {
isCollapsed: boolean;
getAttribute(attribute: string): string;
getFirstPosition(): undefined | TextPosition;
getFirstRange(): Range;
getLastPosition(): undefined | TextPosition;
getSelectedElement(): CKNode;
hasAttribute(attribute: string): boolean;
};
getRoot(): CKNode;
on(event: string, cb: () => void): any;
registerPostFixer(callback: (writer: Writer) => boolean): any;
};
change(cb: (writer: Writer) => void): any;
insertContent(modelFragment: any, selection?: any): any;
};
plugins: { get(command: string): any };
sourceElement: HTMLElement;
create(
el: HTMLElement,
config: {
mention: MentionConfig;
placeholder: string;
removePlugins?: string[];
toolbar: { items: any[] };
},
): any;
enableReadOnlyMode(reason: string): any;
execute<T>(action: string, ...args: unknown[]): T;
focus(): void;
getData(): string;
getSelectedHtml(): string;
removeSelection(): void;
setData(data: string): void;
}
conversiondataeditingmodelpluginssourceElement
createenableReadOnlyModeexecutefocusgetDatagetSelectedHtmlremoveSelectionsetData
conversion: {
for(
filter: string,
): {
markerToHighlight(
data: { model: string; view: (data: { markerName: string }) => void },
): any;
};
}
data: {
processor: { toView(html: string): any };
toModel(viewFeragment: any): any;
}
editing: {
view: {
document: {
getRoot(): CKNode;
on(
event: string,
cb: (event: CKEvent, data: { preventDefault(): any }) => void,
opts?: { priority: "high" },
): any;
};
domRoots: { values: () => { next: () => { value: string } } };
change(cb: (writer: Writer) => void): any;
focus(): void;
scrollToTheSelection(): void;
};
}
model: {
document: {
differ: {
getChanges(): {
name: string;
position?: { nodeAfter?: CKNode; parent: CKNode; toJSON(): Object };
type: string;
}[];
};
selection: {
isCollapsed: boolean;
getAttribute(attribute: string): string;
getFirstPosition(): undefined | TextPosition;
getFirstRange(): Range;
getLastPosition(): undefined | TextPosition;
getSelectedElement(): CKNode;
hasAttribute(attribute: string): boolean;
};
getRoot(): CKNode;
on(event: string, cb: () => void): any;
registerPostFixer(callback: (writer: Writer) => boolean): any;
};
change(cb: (writer: Writer) => void): any;
insertContent(modelFragment: any, selection?: any): any;
}
plugins: { get(command: string): any }
sourceElement: HTMLElement
create(
el: HTMLElement,
config: {
mention: MentionConfig;
placeholder: string;
removePlugins?: string[];
toolbar: { items: any[] };
},
): any
enableReadOnlyMode(reason: string): any
execute<T>(action: string, ...args: unknown[]): T
focus(): void
getData(): string
getSelectedHtml(): string
removeSelection(): void
setData(data: string): void
Member Visibility
ThemeOSLightDark
Properties conversiondataeditingmodelpluginssourceElement Methods createenableReadOnlyModeexecutefocusgetDatagetSelectedHtmlremoveSelectionsetData