menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RichTextEditorSlashMenuSettings - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class RichTextEditorSlashMenuSettings

    Configures the slash menu settings for the Blazor Rich Text Editor.

    Inheritance
    System.Object
    RichTextEditorSlashMenuSettings
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class RichTextEditorSlashMenuSettings : OwningComponentBase

    Constructors

    RichTextEditorSlashMenuSettings()

    Declaration
    public RichTextEditorSlashMenuSettings()

    Properties

    Enable

    Gets or sets a value indicating whether the slash menu is enabled in the rich text editor.

    Declaration
    public bool Enable { get; set; }
    Property Value
    Type Description
    System.Boolean

    A System.Boolean indicating whether the slash menu is enabled. The default value is false.

    Remarks

    When set to true, the slash menu is displayed when the user types a slash (/) in the editor.

    When set to false, the slash menu is disabled, and no menu appears.

    Items

    Gets or sets the collection of menu items displayed in the slash menu.

    Declaration
    public List<SlashMenuItemModel> Items { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<SlashMenuItemModel>

    A System.Collections.Generic.List<> of SlashMenuItemModel containing the menu items to display. The default value is an empty collection.

    Remarks

    This property defines the menu items available in the slash menu.

    Each item in the collection must be a valid SlashMenuItemModel instance with configured properties like Text and Command.

    Examples

    This example shows how to add items to the Items property.

     
    
    <SfRichTextEditor> 
        <RichTextEditorSlashMenuSettings Items="Tools" /> 
    </SfRichTextEditor> 
    @code { 
        private List<SlashMenuItemModel> Tools = new List<SlashMenuItemModel> 
        { 
            new SlashMenuItemModel { Text = "Heading 1", Command = SlashMenuCommand.Heading1, IconCss = "e-icon-heading1" } 
        }; 
    } 

    PopupHeight

    Gets or sets the height of the slash menu popup.

    Declaration
    public string PopupHeight { get; set; }
    Property Value
    Type Description
    System.String

    A System.String representing the height of the slash menu popup in CSS units (e.g., "px", "%"). The default value is "320px".

    Remarks

    This property controls the height of the slash menu popup in the rich text editor.

    Examples

    This example shows how to set the PopupHeight property.

     
    
    <SfRichTextEditor> 
        <RichTextEditorSlashMenuSettings PopupHeight="450px" /> 
    </SfRichTextEditor> 

    PopupWidth

    Gets or sets the width of the slash menu popup.

    Declaration
    public string PopupWidth { get; set; }
    Property Value
    Type Description
    System.String

    A System.String representing the width of the slash menu popup in CSS units (e.g., "px", "%"). The default value is "300px".

    Remarks

    For responsive designs, consider using percentage-based values; otherwise, pixel values provide precise control.

    If a negative value is provided, the width is set to "auto", allowing the popup to adjust dynamically based on content or layout.

    Examples

    This example shows how to set the PopupWidth property.

     
    
    <SfRichTextEditor> 
        <RichTextEditorSlashMenuSettings PopupWidth="400px" /> 
    </SfRichTextEditor> 

    Methods

    Dispose(Boolean)

    Dispose unmanaged resources in the Blazor component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Boolean value to dispose the object.

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved