RadzenHtmlEditorCustomTool Class

A custom tool in RadzenHtmlEditor

Inheritance

Object

ComponentBase

RadzenHtmlEditorCustomTool

Implements

IComponent

IHandleEvent

IHandleAfterRender

Inherited Members

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

Syntax

public class RadzenHtmlEditorCustomTool : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

Examples

<RadzenHtmlEditor Execute=@OnExecute>
  <RadzenHtmlEditorCustomTool CommandName="InsertToday" Icon="today" Title="Insert today" />
</RadzenHtmlEditor>
@code {
  string html = "@lt;strong>Hello</strong> world!"; 
  async Task OnExecute(HtmlEditorExecuteEventArgs args)
  {
    if (args.CommandName == "InsertToday")
    {
      await args.Editor.ExecuteCommandAsync(HtmlEditorCommands.InsertHtml, DateTime.Today.ToLongDateString());
    }
 }

Constructors

RadzenHtmlEditorCustomToollink

A custom tool in RadzenHtmlEditor

Declaration
public RadzenHtmlEditorCustomTool()

Properties

CommandNamelink

Declaration
public string CommandName { get; set; }
Property Value
Type Description
string

Disabledlink

Specifies whether the tool is disabled.

Declaration
public bool Disabled { get; set; }
Property Value
Type Description
boolSpecifies whether the tool is disabled.

Editorlink

The RadzenHtmlEditor component which this tool is part of.

Declaration
public RadzenHtmlEditor Editor { get; set; }
Property Value
Type Description
RadzenHtmlEditorThe RadzenHtmlEditor component which this tool is part of.

EnabledModeslink

Specifies the modes that this tool will be enabled in.

Declaration
public HtmlEditorMode EnabledModes { get; set; }
Property Value
Type Description
HtmlEditorModeSpecifies the modes that this tool will be enabled in.

Iconlink

Specifies the icon of the tool. Set to "settings" by default.

Declaration
public string Icon { get; set; }
Property Value
Type Description
stringSpecifies the icon of the tool. Set to "settings" by default.

IconColorlink

Gets or sets the icon color.

Declaration
public string IconColor { get; set; }
Property Value
Type Description
stringGets or sets the icon color.

Selectedlink

Specifies whether the tool is selected.

Declaration
public bool Selected { get; set; }
Property Value
Type Description
boolSpecifies whether the tool is selected.

Templatelink

The template of the tool. Use to render a custom tool.

Declaration
public RenderFragment<RadzenHtmlEditor> Template { get; set; }
Property Value
Type Description
RenderFragment<RadzenHtmlEditor>The template of the tool. Use to render a custom tool.

Titlelink

Specifies the title (tooltip) displayed when the user hovers the tool.

Declaration
public string Title { get; set; }
Property Value
Type Description
stringSpecifies the title (tooltip) displayed when the user hovers the tool.

Visiblelink

Determines if the tools is visible.

Declaration
public bool Visible { get; set; }
Property Value
Type Description
boolDetermines if the tools is visible.

Methods

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder
An error has occurred. This app may no longer respond until reloaded. Reload 🗙