alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class BlockEditorTransform

    Provides configuration for the transform dropdown menu in the SfBlockEditor inline toolbar.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    BlockEditorTransform
    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.BlockEditor
    Assembly: Syncfusion.Blazor.BlockEditor.dll
    Syntax
    public class BlockEditorTransform : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    The BlockEditorTransform component customizes the transform menu items, including text, icons, and behavior configuration. This allows you to control which block types are available for transformation and customize their appearance.

    Use the Items property to define available transformation options, and configure the popup dimensions with PopupWidth and PopupHeight. Subscribe to the ItemSelect event to handle custom transformation logic.

    Constructors

    BlockEditorTransform()

    Declaration
    public BlockEditorTransform()

    Properties

    ItemSelect

    Gets or sets the event callback that is triggered when a transform item is selected from the dropdown menu.

    Declaration
    [Parameter]
    public EventCallback<TransformItemSelectEventArgs> ItemSelect { get; set; }
    Property Value
    Type Description
    EventCallback<TransformItemSelectEventArgs>

    An EventCallback<TValue> of type TransformItemSelectEventArgs that handles the transform item selection event. No default value.

    Remarks

    Use this event to execute custom logic when a user selects a block transformation option. The event provides access to the selected TransformItemModel and allows you to cancel the transformation by setting Cancel to true.

    If Cancel is set to true, the default transformation behavior is suppressed.

    Examples
    <SfBlockEditor>
        <BlockEditorTransform OnItemSelect="HandleTransformItemSelect" />
    </SfBlockEditor>
    
    @code {
        private void HandleTransformItemSelect(TransformItemSelectEventArgs args)
        {
            if (args.Command.Type == BlockType.Quote)
            {
                // Perform custom logic for quote blocks
                Console.WriteLine($"Transforming to: {args.Command.Label}");
            }
        }
    }

    Items

    Gets or sets the individual items available in the transform dropdown menu.

    Declaration
    [Parameter]
    public List<TransformItemModel> Items { get; set; }
    Property Value
    Type Description
    List<TransformItemModel>

    A List<T> of TransformItemModel objects that define the available block types for transformation. The default value is an empty collection.

    Remarks

    If not explicitly set, the default transform items (Paragraph, Headings 1-4, Bullet List, Numbered List, Checklist) will be used.

    You can customize this collection to include only the block types you want to support for transformation. Each item in the collection defines a transformation option with its block type, display label, icon, and associated metadata.

    PopupHeight

    Gets or sets the height of the transform dropdown popup.

    Declaration
    [Parameter]
    public string PopupHeight { get; set; }
    Property Value
    Type Description
    string

    A string representing the CSS height of the dropdown popup. Accepts CSS-valid values such as "auto", "300px", or "50vh". The default value is "auto".

    Remarks

    This property controls the vertical dimension of the popup menu. When set to "auto", the height automatically adjusts based on the number of items available in the Items collection.

    PopupWidth

    Gets or sets the width of the transform dropdown popup.

    Declaration
    [Parameter]
    public string PopupWidth { get; set; }
    Property Value
    Type Description
    string

    A string representing the CSS width of the dropdown popup. Accepts CSS-valid values such as "250px", "100%", or "auto". The default value is "250px".

    Remarks

    This property controls the horizontal dimension of the popup menu. Use standard CSS width values to ensure proper alignment with your UI layout.

    Methods

    Dispose(bool)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    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 - 2026 Syncfusion Inc. All Rights Reserved