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 to this section

A custom tool in RadzenHtmlEditor

Declaration
public RadzenHtmlEditorCustomTool()

Properties

CommandNameLink to this section

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

DisabledLink to this section

Specifies whether the tool is disabled.

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

EditorLink to this section

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 to this section

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 to this section

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 to this section

Gets or sets the icon color.

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

SelectedLink to this section

Specifies whether the tool is selected.

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

TemplateLink to this section

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 to this section

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 to this section

Determines if the tools is visible.

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

Methods

BuildRenderTreeLink to this section

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 🗙