alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class BlockEditorCodeBlock

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

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

    This allows configuration of global code block options such as Languages and DefaultLanguage.

    Constructors

    BlockEditorCodeBlock()

    Declaration
    public BlockEditorCodeBlock()

    Properties

    DefaultLanguage

    Gets or sets the default language used for syntax highlighting in Code blocks.

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

    The value should correspond to one of the Languages options (for example, its identifier). Defaults to "plaintext" when not specified.

    Languages

    Gets or sets the collection of languages available for syntax highlighting in Code blocks.

    Declaration
    [Parameter]
    public List<CodeLanguageModel> Languages { get; set; }
    Property Value
    Type
    List<CodeLanguageModel>
    Remarks
    • Provide a list of CodeLanguageModel items to control which languages users can choose.

    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