Skip to Content
ClassesFDocument

类: FDocument

属性

属性修饰符类型

id

readonly

string

方法

appendText()

appendText(text): Promise<boolean>;

Adds the specified text to the end of this text region.

参数

参数类型描述
textstringThe text to be added to the end of this text region.

返回

Promise<boolean>


getId()

getId(): string;

返回

string


getName()

getName(): string;

返回

string


getSnapshot()

getSnapshot(): IDocumentData;

返回

IDocumentData


redo()

redo(): Promise<boolean>;

返回

Promise<boolean>


setSelection()

setSelection(startOffset, endOffset): void;

Sets the selection to a specified text range in the document.

参数

参数类型描述
startOffsetnumberThe starting offset of the selection in the document.
endOffsetnumberThe ending offset of the selection in the document.

返回

void

示例

document.setSelection(10, 20);

undo()

undo(): Promise<boolean>;

返回

Promise<boolean>