Document
| Packages | @univerjs/docs-ui |
|---|
This class should not be instantiated directly. Use factory methods on
univerAPIinstead.
Overview
@univerjs/docs-ui
| Method | Description |
|---|---|
appendText | Adds the specified text to the end of this text region |
getId | - |
getName | - |
getSnapshot | - |
id | - |
redo | - |
setSelection | Sets the selection to a specified text range in the document |
undo | - |
APIs
Getters & Queries
getId
Signature
getId(): stringReturns
string— See signature above.
@univerjs/docs-ui
getName
Signature
getName(): stringReturns
string— See signature above.
@univerjs/docs-ui
getSnapshot
Signature
getSnapshot(): IDocumentDataReturns
IDocumentData— See signature above.
@univerjs/docs-ui
Setters & Modifiers
setSelection
Sets the selection to a specified text range in the document.
Signature
setSelection(startOffset: number, endOffset: number): voidParameters
startOffsetnumber— No descriptionendOffsetnumber— No description
Examples
document.setSelection(10, 20);@univerjs/docs-ui
Actions & Operations
redo
Signature
redo(): Promise<boolean>Returns
Promise<boolean>— See signature above.
@univerjs/docs-ui
undo
Signature
undo(): Promise<boolean>Returns
Promise<boolean>— See signature above.
@univerjs/docs-ui
Miscellaneous
appendText
Adds the specified text to the end of this text region.
Signature
appendText(text: string): Promise<boolean>Parameters
textstring— No description
Returns
Promise<boolean>— See signature above.
@univerjs/docs-ui
id
Signature
id: stringReturns
string— See signature above.
@univerjs/docs-ui