# Interface TextEditor

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;
}

- Defined in src/public/app/types.d.ts:332

##### Index

### Properties

conversion
data
editing
model
plugins
sourceElement

### Methods

create
enableReadOnlyMode
execute
focus
getData
getSelectedHtml
removeSelection
setData

## Properties

### conversion

conversion: {
for(
filter: string,
): {
markerToHighlight(
data: { model: string; view: (data: { markerName: string }) => void },
): any;
};
}

- Defined in src/public/app/types.d.ts:402

### data

data: {
processor: { toView(html: string): any };
toModel(viewFeragment: any): any;
}

- Defined in src/public/app/types.d.ts:396

### editing

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;
};
}

- Defined in src/public/app/types.d.ts:371

### model

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;
}

- Defined in src/public/app/types.d.ts:342

### plugins

plugins: { get(command: string): any }

- Defined in src/public/app/types.d.ts:393

### sourceElement

sourceElement: HTMLElement

- Defined in src/public/app/types.d.ts:418

## Methods

### create

- create(
  el: HTMLElement,
  config: {
  mention: MentionConfig ;
  placeholder: string;
  removePlugins?: string[];
  toolbar: { items: any[] };
  },
  ): any

  #### Parameters

  - el: HTMLElement
  - config: {
    mention: MentionConfig ;
    placeholder: string;
    removePlugins?: string[];
    toolbar: { items: any[] };
    }

  #### Returns any

  - Defined in src/public/app/types.d.ts:333

### enableReadOnlyMode

- enableReadOnlyMode(reason: string): any

  #### Parameters

  - reason: string

  #### Returns any

  - Defined in src/public/app/types.d.ts:341

### execute

- execute< T >(action: string, ...args: unknown[]): T

  #### Type Parameters

  - T

  #### Parameters

  - action: string
  - ...args: unknown[]

  #### Returns T

  - Defined in src/public/app/types.d.ts:416

### focus

- focus(): void

  #### Returns void

  - Defined in src/public/app/types.d.ts:417

### getData

- getData(): string

  #### Returns string

  - Defined in src/public/app/types.d.ts:412

### getSelectedHtml

- getSelectedHtml(): string

  #### Returns string

  - Defined in src/public/app/types.d.ts:414

### removeSelection

- removeSelection(): void

  #### Returns void

  - Defined in src/public/app/types.d.ts:415

### setData

- setData(data: string): void

  #### Parameters

  - data: string

  #### Returns void

  - Defined in src/public/app/types.d.ts:413