blazor-devexpress-dot-blazor-dot-richedit-dot-richeditbaritemnames-2d755959.md
Gets the Add Paragraphs to Table of Contents Menu item’s name.
Namespace : DevExpress.Blazor.RichEdit
Assembly : DevExpress.Blazor.RichEdit.v25.2.dll
NuGet Package : DevExpress.Blazor.RichEdit
public static string AddParagraphsToTableOfContentsMenu { get; }
| Type | Description |
|---|---|
| String |
The “AddParagraphsToTableOfContentsMenu” string.
|
Use this property to perform the following operations:
The Add Paragraphs to Table of Contents Menu item is a drop-down menu in the Table of Contents group. This menu contains the following items that allow users to include or exclude selected paragraphs from a table of contents:
Use the Insert Table of Contents Field item to insert a table of contents.
The following code snippet removes items from the Add Paragraphs to Table of Contents Menu item:
<DxRichEdit CustomizeRibbon="onCustomizeRibbon" />
@code {
void onCustomizeRibbon(IRibbon ribbon) {
IBarItem headingsMenu = ribbon.Tabs[RichEditRibbonTabNames.References].Groups[RichEditRibbonGroupNames.ReferencesTableOfContents].Items[RichEditBarItemNames.AddParagraphsToTableOfContentsMenu];
if (headingsMenu.Type == BarItemTypes.DropDown) {
IBarDropDown headingsDropDown = (IBarDropDown)headingsMenu;
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphBodyTextLevel);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading1Level);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading2Level);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading3Level);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading4Level);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading5Level);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading6Level);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading7Level);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading8Level);
headingsDropDown.Items.Remove(RichEditBarItemNames.ParagraphHeading9Level);
}
}
}
See Also