New to Telerik UI for WinFormsStart a free 30-day trial

Represents a base command for HTML editing operations in the markup editor.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMarkupEditor.dll

Syntax:

C#
public class HtmlCommand

Inheritance: objectHtmlCommand

Derived Classes: EditStackCommandHtmlCommandWithValue

Constructors

Initializes a new instance of the HtmlCommand class.

C#
public HtmlCommand(string command, IRadMarkupEditor editor)
Parameters:commandstring

The HTML command string.

editorIRadMarkupEditor

The markup editor instance.

Properties

Gets a value indicating whether the command is appropriate for the current context.

C#
protected virtual bool Appropriate { get; }

Gets the command string.

C#
protected string Command { get; }

Document

IHTMLDocument2

Gets the HTML document associated with this command.

C#
protected IHTMLDocument2 Document { get; }

Gets the markup editor instance.

C#
protected IRadMarkupEditor Editor { get; }

Gets or sets a value indicating whether the command is enabled.

C#
public bool Enabled { get; set; }

Methods

Executes the command without parameters.

C#
public bool Execute()
Returns:

bool

True if the command was executed successfully; otherwise, false.

Executes the command with the specified value.

C#
public virtual bool Execute(object value)
Parameters:valueobject

The command parameter value.

Returns:

bool

True if the command was executed successfully; otherwise, false.