InsertTextCommand.execute(text) Method
In This Article
Executes the InsertTextCommand command with the specified parameters.
#Declaration
TypeScript
execute(
text: string,
interval?: Interval | number,
subDocumentId?: number
): boolean
#Parameters
Name | Type | Description |
---|---|---|
text | string | A text to insert. |
interval | number | Interval | A position or interval where the text is inserted. |
sub |
number | The value that specifies the sub-document. |
#Returns
Type | Description |
---|---|
boolean |
|
#Remarks
Note that this method does not change the selection
//Inserts a text at the end of the active sub-document
richEdit.selection.goToDocumentEnd();
richEdit.commands.insertText.execute("sometext");
If you need to access a header/footer sub-document, you can use the Section‘s Section.headers and Section.footers properties. A document’s sections are available via the RichEditDocument.sectionsInfo property.
See Also