Class BlockEditor
Inheritance
Namespace: Syncfusion.EJ2.BlockEditor
Assembly: Syncfusion.EJ2.dll
Syntax
public class BlockEditor : EJTagHelper
Constructors
BlockEditor()
Declaration
public BlockEditor()
Properties
AfterPasteCleanup
Event triggered after a paste operation occurs in the block editor. This event provides details about the pasted content.
Declaration
public string AfterPasteCleanup { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null |
BeforePasteCleanup
Event triggered before a paste operation occurs in the block editor. This event allows interception or modification of the pasted content.
Declaration
public string BeforePasteCleanup { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null |
BlockActionMenuSettings
Specifies the configuration settings for the block actions menu. This property allows customization of the actions menu within the editor.
Declaration
public BlockActionMenuSettings BlockActionMenuSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| BlockActionMenuSettings | The default value is null |
BlockChanged
Event triggered when the editor blocks are changed. This event provides details about the changes made to the editor blocks.
Declaration
public string BlockChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null |
BlockDragging
Event triggered during the dragging operation of a block. This event provides details about the drag operation.
Declaration
public string BlockDragging { 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 |
BlockDropped
Event triggered when a block is dropped after a drag operation. This event provides details about the block drop action.
Declaration
public string BlockDropped { 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 object Blocks { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | 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 |
CodeBlockSettings
Configures settings related to code block in the editor. This property utilizes the CodeBlockSettingsModel to specify various options for code block settings.
Declaration
public object CodeBlockSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The default value is null |
CommandMenuSettings
Specifies configuration options for editor commands. This property allows customization of command behaviors within the editor.
Declaration
public CommandMenuSettings CommandMenuSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| CommandMenuSettings | 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> |
ContextMenuSettings
Specifies settings for the context menu. This property configures the context menu options that appear on right-click actions.
Declaration
public ContextMenuSettings ContextMenuSettings { 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 "" |
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 "auto" |
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 |
ImageBlockSettings
Configures settings related to image block in the editor. This property utilizes the ImageBlockSettingsModel to specify various options for image block settings.
Declaration
public object ImageBlockSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The default value is null |
InlineToolbarSettings
Specifies settings for the formatting toolbar. This property configures the toolbar that provides text formatting options.
Declaration
public InlineToolbarSettings InlineToolbarSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| InlineToolbarSettings | 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. The default locale value is 'en-US'.
Declaration
public string Locale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "en-US" |
PasteCleanupSettings
Configures settings related to pasting content in the editor. This property utilizes the PasteCleanupSettingsModel to specify various options and behaviors for paste operations.
Declaration
public PasteCleanupSettings PasteCleanupSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| PasteCleanupSettings | 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 |
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%" |