Back to Devexpress

ToolbarCutButton Class

aspnet-devexpress-dot-web-dot-aspxhtmleditor-9c07c27e.md

latest3.9 KB
Original Source

ToolbarCutButton Class

A default toolbar button that allows the content selected within the design view area to be cut and copied to the clipboard.

Namespace : DevExpress.Web.ASPxHtmlEditor

Assembly : DevExpress.Web.ASPxHtmlEditor.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class ToolbarCutButton :
    HtmlEditorToolbarItem
vb
Public Class ToolbarCutButton
    Inherits HtmlEditorToolbarItem

Remarks

The ASPxHtmlEditor allows end-users to work with the clipboard. The clipboard provides the capability to perform cut, copy and paste operations using toolbar buttons, the context menu, or shortcuts.

The ASPxHtmlEditor provides the Cut ( ToolbarCutButton ), Copy (ToolbarCopyButton), and Paste (ToolbarPasteButton) toolbar buttons.

You can add the Cut button to toolbars by using either the ASPxHtmlEditor designer at design time, or programmatically.

csharp
protected void Page_Load(object sender, EventArgs e) {
    HtmlEditorToolbar stToolbar1 = HtmlEditorToolbar.CreateStandardToolbar1();
    ToolbarCutButton cutButton = new ToolbarCutButton();
    stToolbar1.Items.Add(cutButton);
    ASPxHtmlEditor1.Toolbars.Add(stToolbar1);
}
aspx
<dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server">
    <Toolbars>
        <dx:HtmlEditorToolbar Name="StandardToolbar1">
            <Items>
                <dx:ToolbarCutButton>
                </dx:ToolbarCutButton>
            </Items>
        </dx:HtmlEditorToolbar>
    </Toolbars>
</dx:ASPxHtmlEditor>

Note

Some browsers (e.g., Firefox, Chrome) do not allow scripts to work with the clipboard for security reasons. As a result, the Cut , Copy and Paste toolbox items are disabled for these browsers.

Implements

IStateManager

IPropertiesOwner

IExpressionsAccessor

Inheritance

Object StateManager CollectionItem ToolbarItemBase HtmlEditorToolbarItem ToolbarCutButton

See Also

ToolbarCutButton Members

HTML Editor

Default Toolbar Items

Menu Toolbar Items

Html Editor Designer

DevExpress.Web.ASPxHtmlEditor Namespace