FDocument
| packages | @univerjs/docs-ui |
|---|
APIs
appendText
Adds the specified text to the end of this text region.
Signature
appendText(text: string): Promise<boolean>Parameters
text(string) — - The text to be added to the end of this text region.
getId
Signature
getId(): stringgetName
Signature
getName(): stringgetSnapshot
Signature
getSnapshot(): IDocumentDataredo
Signature
redo(): Promise<boolean>setSelection
Sets the selection to a specified text range in the document.
Signature
setSelection(startOffset: number, endOffset: number): voidParameters
startOffset(number) — - The starting offset of the selection in the document.endOffset(number) — - The ending offset of the selection in the document.
Examples
document.setSelection(10, 20)undo
Signature
undo(): Promise<boolean>