New to Telerik UI for WinForms? Start a free 30-day trial

Inserts text at the caret, replacing selected content when present.

Definition

Constructors

Initializes the command for the specified editor.

C#
public InsertTextCommand(RadRichTextBox radRichTextBox)
Parameters:radRichTextBoxRadRichTextBox

The editor into which text is inserted.

Properties

Marks text insertion as an operation that may replace selected content for protected-range permission checks.

C#
protected override bool IsDeletingCommand { get; }

Overrides: RichTextBoxCommandBase.IsDeletingCommand

Methods

Rejects empty text and text containing a tab when the associated editor does not accept tabs.

C#
protected override bool CanExecuteOverride(object parameter)
Parameters:parameterobject

The value that will be converted to inserted text.

Returns:

bool

false for empty text or a disallowed tab; otherwise, the base command's availability result.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)

Converts the parameter to text and inserts it into the associated editor.

C#
protected override void ExecuteOverride(object parameter)
Parameters:parameterobject

The text to insert, or an object converted to text by ToString(object).

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)