Class BlockChange
Describes a single block operation performed within the SfBlockEditor.
Inherited Members
Namespace: Syncfusion.Blazor.BlockEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class BlockChange
Remarks
A change consists of an Action (for example, insertion or deletion) and a Data payload that provides additional context such as the affected block and its parents.
Examples
Creates an insertion change for a newly added block.
var change = new BlockChange
{
Action = BlockAction.Insertion,
Data = new BlockData
{
Block = new BlockModel { ID = "b-123", BlockType = BlockType.Paragraph },
CurrentParent = null
}
};
Constructors
BlockChange()
Declaration
public BlockChange()
Properties
Action
Gets or sets the type of action performed on the block.
Declaration
[JsonConverter(typeof(JsonStringEnumConverter))]
public BlockAction Action { get; set; }
Property Value
| Type | Description |
|---|---|
| BlockAction | A BlockAction indicating the operation. The default value is Update. |
Remarks
Supported values are documented in BlockAction.
Data
Gets or sets the data associated with this block change.
Declaration
public BlockData Data { get; set; }
Property Value
| Type | Description |
|---|---|
| BlockData | A BlockData instance providing the current and previous state context. The default value is null. |
Remarks
May be null for actions that do not require additional context.