Skip to main content

RichEditBarItemNames.InsertFieldMenu Property

Gets the Insert Field Menu item’s name.

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v24.1.dll

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public static string InsertFieldMenu { get; }

Property Value

Type Description
String

The “InsertFieldMenu” string.

Remarks

Use this property to perform the following operations:

The Insert Field item is a drop-down menu in the Insert Fields group and the Field group. This menu contains the following items that allow users to insert fields:

When a user clicks the Insert Field Menu, the Rich Text Editor inserts an empty field at the caret position. Use the drop down‘s Click property to change this behavior.

The following code snippet removes items from the Insert Field Menu item:

<DxRichEdit CustomizeRibbon="onCustomizeRibbon" />

@code {
    void onCustomizeRibbon(IRibbon ribbon) {
        IBarItem insertFieldMenu = ribbon.Tabs[RichEditRibbonTabNames.MailMerge].Groups[RichEditRibbonGroupNames.MailMergeInsertFields].Items[RichEditBarItemNames.InsertFieldMenu];
        if (insertFieldMenu.Type == BarItemTypes.DropDown) {
            IBarDropDown insertFieldDropDown = (IBarDropDown)insertFieldMenu;
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertDateField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertDocVariableField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertMergeField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertNumpagesField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertPageField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertTimeField);
        }
    }
}
See Also