Class BlockEditorInlineToolbar
Gets or sets the settings for the inline formatting toolbar in the editor.
Inherited Members
Namespace: Syncfusion.Blazor.BlockEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class BlockEditorInlineToolbar : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
The toolbar appears near the selected text and provides options like bold, italic, link and extra.
Constructors
BlockEditorInlineToolbar()
Declaration
public BlockEditorInlineToolbar()
Properties
Enable
Specifies whether the inline toolbar is enabled.
Declaration
[Parameter]
public bool Enable { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A boolean value indicating whether the inline toolbar is enabled. The default value is |
Remarks
If set to false, the inline toolbar will not be rendered or interactable.
ItemClick
Triggers when an item in the inline toolbar is being clicked.
Declaration
[Parameter]
public EventCallback<InlineToolbarItemClickEventArgs> ItemClick { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<InlineToolbarItemClickEventArgs> | An event callback that provides the InlineToolbarItemClickEventArgs. |
Remarks
Use this event to handle the logic associated with the clicked toolbar item.
Examples
private void OnItemClick(InlineToolbarItemClickEventArgs args)
{
Console.WriteLine($""Clicked item: {args.Item.Text}"");
}
Items
Specifies the individual items within the inline toolbar, including commands, icons, and labels.
Declaration
[Parameter]
public List<InlineToolbarItemModel> Items { get; set; }
Property Value
| Type | Description |
|---|---|
| List<InlineToolbarItemModel> | A collection of InlineToolbarItemModel objects that define the toolbar content. |
Remarks
This property allows configuring custom toolbar items, such as buttons for custom formatting or inserting content.
PopupWidth
Specifies the width of the inline toolbar popup.
Declaration
[Parameter]
public string PopupWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the CSS width of the toolbar. Accepts values like |
Remarks
If not explicitly set, the default value is "100%", allowing the toolbar to adjust based on its content.
Methods
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
|---|
| Task |