Back to Devexpress

HtmlEditorToolbarItemNames Class

blazor-devexpress-dot-blazor-adbcc6ca.md

latest1.9 KB
Original Source

HtmlEditorToolbarItemNames Class

Contains names of built-in toolbar items.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public static class HtmlEditorToolbarItemNames

Remarks

Use HtmlEditorToolbarItemNames class properties to perform the following operations:

  • Access and customize built-in items.
  • Add built-in items to groups.
  • Remove built-in items from groups.

The following code snippet removes Font Color and Highlight Text commands from the Font group and adds them to a custom toolbar group:

razor
<DxHtmlEditor Width="100%"
              Height="500px"
              CustomizeToolbar="@OnCustomizeToolbar"/>

@code {
    void OnCustomizeToolbar(IToolbar toolbar) {
        IBarGroup fontGroup = toolbar.Groups[HtmlEditorToolbarGroupNames.Font];
        fontGroup.Items.Remove(HtmlEditorToolbarItemNames.FontColor);
        fontGroup.Items.Remove(HtmlEditorToolbarItemNames.HighlightText);

        IBarGroup colorTextGroup = toolbar.Groups.AddCustomGroup(1);
        colorTextGroup.Items.Add(HtmlEditorToolbarItemNames.FontColor);
        colorTextGroup.Items.Add(HtmlEditorToolbarItemNames.HighlightText);
    }
}

Inheritance

Object HtmlEditorToolbarItemNames

See Also

HtmlEditorToolbarItemNames Members

DevExpress.Blazor Namespace