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

Inserts a copy of a supplied field at the caret when the current selection has no more than one range.

Definition

Constructors

Creates a command that inserts fields into the specified editor.

C#
public InsertFieldCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The editor where the field is inserted.

Properties

Applies deleting-command permission rules because field insertion can replace selected content.

C#
protected override bool IsDeletingCommand { get; }

Overrides: RichTextBoxCommandBase.IsDeletingCommand

Methods

Returns whether the current selection contains at most one range.

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

Not used; availability depends on the current selection.

Returns:

bool

true when the selection has zero or one range.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)

Inserts a deep copy of the supplied field; parameters that are not fields are ignored.

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

The Field to copy and insert.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)