alexa
menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class BlockEditor

    Inheritance
    System.Object
    Syncfusion.EJ2.EJTagHelper
    BlockEditor
    Namespace: Syncfusion.EJ2.BlockEditor
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class BlockEditor : EJTagHelper

    Constructors

    BlockEditor()

    Declaration
    public BlockEditor()

    Properties

    AfterPaste

    Event triggered after a paste operation occurs in the block editor. This event provides details about the pasted content.

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

    The default value is null

    BeforePaste

    Event triggered before a paste operation occurs in the block editor. This event allows interception or modification of the pasted content.

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

    The default value is null

    BlockActionsMenu

    Specifies the configuration settings for the block actions menu. This property allows customization of the actions menu within the editor.

    Declaration
    public BlockActionMenuSettings BlockActionsMenu { get; set; }
    Property Value
    Type Description
    BlockActionMenuSettings

    The default value is null

    BlockAdded

    Event triggered when a block is added to the block editor. This event provides details about the newly added block.

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

    The default value is null

    BlockDrag

    Event triggered during the dragging operation of a block. This event provides details about the drag operation.

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

    The default value is null

    BlockDragStart

    Event triggered when the drag operation for a block starts. This event provides details about the initial stage of the drag.

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

    The default value is null

    BlockDrop

    Event triggered when a block is dropped after a drag operation. This event provides details about the block drop action.

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

    The default value is null

    BlockMoved

    Event triggered when a block is moved within the block editor. This event provides details about the moved block.

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

    The default value is null

    BlockRemoved

    Event triggered when a block is removed from the block editor. This event provides details about the block being removed.

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

    The default value is null

    Blocks

    Specifies an array of block models representing the content of the editor. This property holds the various blocks that make up the editor's content.

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

    The default value is null

    Blur

    Event triggered when the block editor loses focus. This event provides details about the blur action.

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

    The default value is null

    CommandMenu

    Specifies configuration options for editor commands. This property allows customization of command behaviors within the editor.

    Declaration
    public CommandMenuSettings CommandMenu { get; set; }
    Property Value
    Type Description
    CommandMenuSettings

    The default value is null

    ContentChanged

    Event triggered when the content of the block editor is changed. This event provides details about the changes made to the content.

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

    The default value is null

    ContentTemplate

    To get or set value for ContentTemplate.

    Declaration
    public MvcTemplate<object> ContentTemplate { get; set; }
    Property Value
    Type
    Syncfusion.EJ2.MvcTemplate<System.Object>

    ContextMenu

    Specifies settings for the context menu. This property configures the context menu options that appear on right-click actions.

    Declaration
    public ContextMenuSettings ContextMenu { get; set; }
    Property Value
    Type Description
    ContextMenuSettings

    The default value is null

    Created

    Event triggered after the Blockeditor is rendered completely.

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

    The default value is null

    CssClass

    Specifies a custom CSS class to apply to the editor. This property allows for additional styling by applying a custom CSS class.

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

    The default value is ""

    EnableAutoHttps

    Specifies whether URLs should automatically have "https://" added if the user does not include it. If disabled, URLs will be entered as-is, without any protocol prepends. This can be useful for internal links or specific use cases where the protocol is not required.

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

    The default value is true

    EnableDragAndDrop

    Specifies whether drag and drop functionality is enabled for the blocks. This property enables or disables drag-and-drop operations within the block editor.

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

    The default value is true

    EnableHtmlEncode

    Specifies whether HTML encoding is enabled. This property determines if the content will be encoded to escape special HTML characters.

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

    The default value is false

    EnableHtmlSanitizer

    Specifies whether the HTML sanitizer is enabled. This property determines if the HTML content will be sanitized to remove potentially harmful tags and attributes.

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

    The default value is true

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

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

    The default value is false

    EnableRtl

    Enable or disable rendering component in right to left direction.

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

    The default value is false

    Focus

    Event triggered when the block editor gains focus. This event provides details about the focus action.

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

    The default value is null

    Height

    Specifies the height of the editor. This property sets the height of the editor, which can be a string or number.

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

    The default value is "100%"

    HtmlAttributes

    Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.

    Declaration
    public object HtmlAttributes { get; set; }
    Property Value
    Type
    System.Object

    InlineToolbar

    Specifies settings for the formatting toolbar. This property configures the toolbar that provides text formatting options.

    Declaration
    public InlineToolbarSettings InlineToolbar { get; set; }
    Property Value
    Type Description
    InlineToolbarSettings

    The default value is null

    KeyActionExecuted

    Event triggered when a key action (both built-in and custom) is executed in the block editor component. This event provides detailed information about the executed key action, including the key combination, the action performed, whether the action was triggered by a custom key configuration, and the platform.

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

    The default value is null

    KeyConfig

    Specifies custom keyboard shortcuts configuration. This property allows the definition of custom keyboard shortcuts for editor commands.

    Declaration
    public object KeyConfig { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    LabelSettings

    Configures settings related to label popup in the editor. This property utilizes the LabelSettingsModel to specify various options and behaviors for paste operations.

    Declaration
    public LabelSettings LabelSettings { get; set; }
    Property Value
    Type Description
    LabelSettings

    The default value is null

    Locale

    Specifies the locale for localization. This property sets the language and regional settings for the editor.

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

    The default value is ""

    PasteSettings

    Configures settings related to pasting content in the editor. This property utilizes the PasteSettingsModel to specify various options and behaviors for paste operations.

    Declaration
    public PasteSettings PasteSettings { get; set; }
    Property Value
    Type Description
    PasteSettings

    The default value is null

    ReadOnly

    Specifies whether the editor is in read-only mode. This property prevents users from editing the content when set to true.

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

    The default value is false

    SelectionChanged

    Event triggered when the selection in the block editor changes. This event provides details about the new selection state.

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

    The default value is null

    UndoRedoPerformed

    Event triggered when an undo or redo operation is performed in the block editor. This event provides details about the undo/redo action that was executed.

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

    The default value is null

    UndoRedoStack

    Specifies the maximum size of the undo/redo stack. This property determines how many actions are stored for undo and redo functionality. With a default value of 30, it allows users to revert up to 30 operations.

    Declaration
    public double UndoRedoStack { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 30

    Users

    Specifies an array of user models representing the list of users. This property holds user details such as name, ID, and other properties.

    Declaration
    public object Users { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    Width

    Specifies the width of the editor. This property sets the width of the editor, which can be a string or number.

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

    The default value is "100%"

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved