Class: FDocument
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:30
Constructors
new FDocument()
new FDocument(
_documentDataModel,
_injector,
_univerInstanceService,
_commandService,
_resourceManagerService,
_renderManagerService): FDocument
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:33
Parameters
Parameter | Type |
---|---|
_documentDataModel | DocumentDataModel |
_injector | Injector |
_univerInstanceService | IUniverInstanceService |
_commandService | ICommandService |
_resourceManagerService | IResourceManagerService |
_renderManagerService | IRenderManagerService |
Returns
Properties
Property | Modifier | Type | Defined in |
---|---|---|---|
_injector | readonly | Injector | submodules/univer/packages/docs-ui/src/facade/f-document.ts:35 |
id | readonly | string | submodules/univer/packages/docs-ui/src/facade/f-document.ts:31 |
Methods
appendText()
appendText(text): Promise<boolean>
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:73
Adds the specified text to the end of this text region.
Parameters
Parameter | Type | Description |
---|---|---|
text | string | The text to be added to the end of this text region. |
Returns
Promise
<boolean
>
getId()
getId(): string
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:44
Returns
string
getName()
getName(): string
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:48
Returns
string
getSnapshot()
getSnapshot(): IDocumentData
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:52
Returns
redo()
redo(): Promise<boolean>
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:64
Returns
Promise
<boolean
>
setSelection()
setSelection(startOffset, endOffset): void
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:112
Sets the selection to a specified text range in the document.
Parameters
Parameter | Type | Description |
---|---|---|
startOffset | number | The starting offset of the selection in the document. |
endOffset | number | The ending offset of the selection in the document. |
Returns
void
Example
document.setSelection(10, 20);
undo()
undo(): Promise<boolean>
Defined in: submodules/univer/packages/docs-ui/src/facade/f-document.ts:59
Returns
Promise
<boolean
>