InsertTextCommandOptions
interface
Interface with parameters for executing InsertTextCommand.
Both range
and selection
parameters are used for defining selection but should not be used together.
If both are defined, only selection
will be considered.
Properties
-
range : ModelRange | undefined
module:typing/inserttextcommand~InsertTextCommandOptions#range
The range in which the text is inserted. Defaults to the first range in the current selection.
-
resultRange : ModelRange | undefined
module:typing/inserttextcommand~InsertTextCommandOptions#resultRange
The range where the selection should be placed after the insertion. If not specified, the selection will be placed right after the inserted text.
-
selection : ModelSelection | ModelDocumentSelection | undefined
module:typing/inserttextcommand~InsertTextCommandOptions#selection
The selection in which the text is inserted. Inserting a text into a selection deletes the current content within selection ranges. If the selection is not specified, the current selection in the model will be used instead.
-
text : string | undefined
module:typing/inserttextcommand~InsertTextCommandOptions#text
The text to be inserted.