Class TransformItemModel
Represents a transform item model that defines a block transformation option in the SfBlockEditor component.
Inherited Members
Namespace: Syncfusion.Blazor.BlockEditor
Assembly: Syncfusion.Blazor.BlockEditor.dll
Syntax
public class TransformItemModel
Remarks
Each TransformItemModel instance defines a single transformation option available in the transform dropdown menu. It includes the block type to transform to, display metadata (label, icon, tooltip), and interaction properties (keyboard shortcut, disabled state).
Transform items are used to populate the Items collection, allowing users to quickly change one block type to another within the editor.
Constructors
TransformItemModel()
Declaration
public TransformItemModel()
Properties
Disabled
Gets or sets a value indicating whether the transform item is disabled.
Declaration
public bool Disabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether this transform item should be disabled in the dropdown menu. The default value is false. |
Remarks
When set to true, the transform item appears in the menu but is not selectable and appears visually disabled (grayed out). This is useful for hiding transformation options based on context or user permissions.
ID
Gets or sets the unique identifier for the transform item.
Declaration
public string ID { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing a unique identifier for this transform item. The default value is an empty string. |
Remarks
Use this property to uniquely identify transform items in your collection, especially when implementing custom event handlers or item management logic.
IconCss
Gets or sets the CSS class for the icon displayed with the transform item.
Declaration
public string IconCss { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string containing CSS class names for the icon. The default value is an empty string. |
Remarks
Typically, this contains icon classes from a CSS icon library (e.g., "e-icon e-paragraph").
If not provided, the transform item displays without an icon.
Label
Gets or sets the label text displayed for the transform item in the dropdown menu.
Declaration
public string Label { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string containing the display label. The default value is an empty string. |
Remarks
This label is shown to the end user in the transform dropdown menu. Provide a clear, concise label that indicates the block type
(e.g., "Heading 1", "Bullet List").
Shortcut
Gets or sets the keyboard shortcut for the transform item.
Declaration
public string Shortcut { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the keyboard shortcut (e.g., |
Remarks
Use standard keyboard shortcut notation to define quick access keys for frequently used transformations. If not provided, no keyboard shortcut is available for this transform item.
The shortcut is typically displayed in the menu and used by the keyboard event handler to trigger the transformation.
Tooltip
Gets or sets the tooltip text displayed when hovering over the transform item.
Declaration
public string Tooltip { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string containing the tooltip content. The default value is an empty string. |
Remarks
When provided, this tooltip appears on mouse hover, offering additional context or information about the transformation option. If not provided, no tooltip is displayed.
Type
Gets or sets the block type of the transform item.
Declaration
[JsonConverter(typeof(JsonStringEnumConverter))]
public BlockType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| BlockType | A BlockType enum value specifying which block type this transformation will create. The default value is Paragraph. |
Remarks
This property determines the target block type when the transform item is selected. Common values include Paragraph, Heading, BulletList, and NumberedList.