Skip to main content

Class: EditorNamespace

Hierarchy

  • NamespaceBase

    EditorNamespace

Methods

collapseSelection

collapseSelection(to): Promise<void>

Parameters

NameType
to"end" | "start"

Returns

Promise<void>


copy

copy(): Promise<SelectionType>

Returns

Promise<SelectionType>


cut

cut(): Promise<undefined | SelectionType>

Returns

Promise<undefined | SelectionType>


delete

delete(): Promise<any>

Returns

Promise<any>


deleteCharacters

deleteCharacters(characters, direction): Promise<any>

Parameters

NameType
charactersnumber
direction1 | -1

Returns

Promise<any>


getCaretPosition

getCaretPosition(): Promise<undefined | DOMRect>

Returns

Promise<undefined | DOMRect>


getFocusedEditorText

getFocusedEditorText(): Promise<undefined | RichTextInterface>

Returns

Promise<undefined | RichTextInterface>


getSelectedRem

getSelectedRem(): Promise<undefined | RemSelection>

Returns

Promise<undefined | RemSelection>


getSelectedText

getSelectedText(): Promise<undefined | TextSelection>

Returns

Promise<undefined | TextSelection>


getSelection

getSelection(): Promise<undefined | RemSelection | TextSelection>

Returns

Promise<undefined | RemSelection | TextSelection>


insertMarkdown

insertMarkdown(markdown): Promise<void>

Parameters

NameType
markdownstring

Returns

Promise<void>


insertPlainText

insertPlainText(string): Promise<void>

Parameters

NameType
stringstring

Returns

Promise<void>


insertRichText

insertRichText(richText): Promise<void>

Parameters

NameType
richTextRichTextInterface

Returns

Promise<void>


moveCaret

moveCaret(amount, unit): Promise<void>

Parameters

NameType
amountnumber
unitMoveUnit

Returns

Promise<void>


moveCaretVertical

moveCaretVertical(direction): Promise<any>

Parameters

NameType
direction1 | -1

Returns

Promise<any>


redo

redo(): Promise<void>

Returns

Promise<void>


selectRem

selectRem(range, portalId?): Promise<any>

Parameters

NameType
rangestring[]
portalId?string

Returns

Promise<any>


selectText

selectText(range): Promise<any>

Parameters

NameType
rangeEditorRange

Returns

Promise<any>


setText

setText(richText): Promise<void>

Parameters

NameType
richTextRichTextInterface

Returns

Promise<void>


undo

undo(): Promise<void>

Returns

Promise<void>