类: FDocument
属性
| 属性 | 修饰符 | 类型 |
|---|---|---|
|
|
|
方法
appendText()
appendText(text): Promise<boolean>;Adds the specified text to the end of this text region.
参数
| 参数 | 类型 | 描述 |
|---|---|---|
text | string | The text to be added to the end of this text region. |
返回
Promise<boolean>
getId()
getId(): string;返回
string
getName()
getName(): string;返回
string
getSnapshot()
getSnapshot(): IDocumentData;返回
redo()
redo(): Promise<boolean>;返回
Promise<boolean>
setSelection()
setSelection(startOffset, endOffset): void;Sets the selection to a specified text range in the document.
参数
| 参数 | 类型 | 描述 |
|---|---|---|
startOffset | number | The starting offset of the selection in the document. |
endOffset | number | The ending offset of the selection in the document. |
返回
void
示例
document.setSelection(10, 20);undo()
undo(): Promise<boolean>;返回
Promise<boolean>