alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class RichTextEditorSlashMenuSettings

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

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    RichTextEditorSlashMenuSettings
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class RichTextEditorSlashMenuSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    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
    [Parameter]
    public bool Enable { get; set; }
    Property Value
    Type Description
    bool

    A bool 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
    [Parameter]
    public List<SlashMenuItemModel>? Items { get; set; }
    Property Value
    Type Description
    List<SlashMenuItemModel>

    A List<T> 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
    [Parameter]
    public string? PopupHeight { get; set; }
    Property Value
    Type Description
    string

    A 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
    [Parameter]
    public string? PopupWidth { get; set; }
    Property Value
    Type Description
    string

    A 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(bool)

    Dispose unmanaged resources in the Blazor component.

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

    Boolean value to dispose the object.

    Overrides
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    Task
    Overrides
    ComponentBase.OnInitializedAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved