Interface

InsertTextCommandOptions (typing)

@ckeditor/ckeditor5-typing/src/inserttextcommand

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.

Filtering

Properties

  • range : Range | undefined

    The range in which the text is inserted. Defaults to the first range in the current selection.

  • resultRange : Range | undefined

    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 : Selection | DocumentSelection | undefined

    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

    The text to be inserted.