Class: EditorNamespace
Hierarchy
NamespaceBase
↳
EditorNamespace
Methods
collapseSelection
▸ collapseSelection(to
): Promise
<void
>
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
characters | number |
direction | 1 | -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
Name | Type |
---|---|
markdown | string |
Returns
Promise
<void
>
insertPlainText
▸ insertPlainText(string
): Promise
<void
>
Parameters
Name | Type |
---|---|
string | string |
Returns
Promise
<void
>
insertRichText
▸ insertRichText(richText
): Promise
<void
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<void
>
moveCaret
▸ moveCaret(amount
, unit
): Promise
<void
>
Parameters
Name | Type |
---|---|
amount | number |
unit | MoveUnit |
Returns
Promise
<void
>
moveCaretVertical
▸ moveCaretVertical(direction
): Promise
<any
>
Parameters
Name | Type |
---|---|
direction | 1 | -1 |
Returns
Promise
<any
>
redo
▸ redo(): Promise
<void
>
Returns
Promise
<void
>
selectRem
▸ selectRem(range
, portalId?
): Promise
<any
>
Parameters
Name | Type |
---|---|
range | string [] |
portalId? | string |
Returns
Promise
<any
>
selectText
▸ selectText(range
): Promise
<any
>
Parameters
Name | Type |
---|---|
range | EditorRange |
Returns
Promise
<any
>
setText
▸ setText(richText
): Promise
<void
>
Parameters
Name | Type |
---|---|
richText | RichTextInterface |
Returns
Promise
<void
>
undo
▸ undo(): Promise
<void
>
Returns
Promise
<void
>