alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class BlockEditorImageBlock

    Gets or sets the settings for the image block in the editor.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    BlockEditorImageBlock
    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 BlockEditorImageBlock : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    This component allows configuration of global image options including:

    • File type restrictions via AllowedTypes
    • Storage format (Base64 or Blob) via SaveFormat
    • Dimensions and constraints (Width, Height, MinWidth, MaxWidth, etc.)
    • Server-side upload via SaveUrl endpoint with progress tracking and success/error badges

    Server Upload Behavior: When SaveUrl is configured (non-empty), the BlockEditorImageUploader component will:

    • Display an upload progress bar overlay during file upload
    • Show success badge (checkmark) on successful upload
    • Show error badge (X) on upload failure
    • Badges auto-hide after 1 second
    • Support multiple simultaneous image uploads with independent progress tracking

    When SaveUrl is empty, server upload is disabled and images are stored locally as Base64 or Blob.

    Constructors

    BlockEditorImageBlock()

    Declaration
    public BlockEditorImageBlock()

    Properties

    AllowedTypes

    Specifies the list of allowed image file types that can be uploaded.

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

    EnableResize

    Specifies whether image can be resized.

    Declaration
    [Parameter]
    public bool EnableResize { get; set; }
    Property Value
    Type Description
    bool

    A boolean value that indicates whether the image block can be resized.

    Height

    Specifies the display height of the image.

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

    A string value representing the popup height. Accepts values in pixels ("px"), percentage ("%"), or "auto".

    MaxFileSize

    Specifies the maximum file size allowed for image uploads in bytes. Files exceeding this size will be rejected during validation.

    Declaration
    [Parameter]
    public double MaxFileSize { get; set; }
    Property Value
    Type Description
    double

    A double value representing the maximum file size in bytes. Default is 30000000 bytes (~30 MB).

    MaxHeight

    Specifies the maximum height of the image in pixels or as a string unit.

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

    MaxWidth

    Specifies the maximum width of the image in pixels or as a string unit.

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

    MinHeight

    Specifies the minimum height of the image in pixels or as a string unit.

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

    MinWidth

    Specifies the minimum width of the image in pixels or as a string unit.

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

    Path

    Specifies the base path for storing and displaying images on the server. This path is appended to the server URL for image storage organization.

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

    A string value representing the server storage path (e.g., "/images/uploads").

    SaveFormat

    Specifies formats available for saving images.

    Declaration
    [Parameter]
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public SaveFormat SaveFormat { get; set; }
    Property Value
    Type Description
    SaveFormat

    Options include saving as Base64 or Blob.

    SaveUrl

    Specifies the server endpoint URL for uploading images. When empty, server upload functionality is disabled.

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

    A string value representing the server upload endpoint URL

    Width

    Specifies the display width of the image.

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

    A string value representing the popup width. Accepts values in pixels ("px"), percentage ("%"), or "auto".

    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