A custom tool in RadzenMarkdownEditor. Either renders a button which raises Execute with CommandName, or arbitrary content via Template.
Object
ComponentBase
IComponent
IHandleEvent
IHandleAfterRender
ComponentBase.OnInitialized
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.OnAfterRenderAsync
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.SetParametersAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenMarkdownEditorCustomTool : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender<RadzenMarkdownEditor @bind-Value=@markdown Execute=@OnExecute>
<RadzenMarkdownEditorCustomTool CommandName="InsertToday" Icon="today" Title="Insert today" />
</RadzenMarkdownEditor>
@code {
async Task OnExecute(MarkdownEditorExecuteEventArgs args)
{
if (args.CommandName == "InsertToday")
{
await args.Editor.ExecuteCommandAsync(MarkdownEditorCommands.InsertText, DateTime.Today.ToLongDateString());
}
}
}A custom tool in RadzenMarkdownEditor. Either renders a button which raises Execute with CommandName, or arbitrary content via Template.
public RadzenMarkdownEditorCustomTool()The command name passed to Execute when the tool is clicked.
public string CommandName { get; set; }
| Type | Description |
|---|---|
| string | The command name passed to Execute when the tool is clicked. |
Specifies whether the tool is disabled.
public bool Disabled { get; set; }
| Type | Description |
|---|---|
| bool | Specifies whether the tool is disabled. |
The editor this tool belongs to.
public RadzenMarkdownEditor Editor { get; set; }
| Type | Description |
|---|---|
| RadzenMarkdownEditor | The editor this tool belongs to. |
The icon of the tool. Set to "settings" by default.
public string Icon { get; set; }
| Type | Description |
|---|---|
| string | The icon of the tool. Set to "settings" by default. |
The icon color.
public string IconColor { get; set; }
| Type | Description |
|---|---|
| string | The icon color. |
Specifies whether the tool is rendered as selected.
public bool Selected { get; set; }
| Type | Description |
|---|---|
| bool | Specifies whether the tool is rendered as selected. |
Custom content rendered instead of the button. Receives the editor.
public RenderFragment<RadzenMarkdownEditor> Template { get; set; }
| Type | Description |
|---|---|
| RenderFragment<RadzenMarkdownEditor> | Custom content rendered instead of the button. Receives the editor. |
The tooltip of the tool.
public string Title { get; set; }
| Type | Description |
|---|---|
| string | The tooltip of the tool. |
Determines if the tool is visible.
public bool Visible { get; set; }
| Type | Description |
|---|---|
| bool | Determines if the tool is visible. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |