Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenHtmlEditorCustomTool

    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(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.SetParametersAsync(ParameterView)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    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

    RadzenHtmlEditorCustomTool()

    A custom tool in RadzenHtmlEditor

    Declaration
    public RadzenHtmlEditorCustomTool()
    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());
        }
     }

    Properties

    CommandName

    A custom tool in RadzenHtmlEditor

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

    Disabled

    Specifies whether the tool is disabled.

    Declaration
    [Parameter]
    public bool Disabled { get; set; }
    Property Value
    Type Description
    bool

    Editor

    The RadzenHtmlEditor component which this tool is part of.

    Declaration
    [CascadingParameter]
    public RadzenHtmlEditor Editor { get; set; }
    Property Value
    Type Description
    RadzenHtmlEditor

    EnabledModes

    Specifies the modes that this tool will be enabled in.

    Declaration
    [Parameter]
    public HtmlEditorMode EnabledModes { get; set; }
    Property Value
    Type Description
    HtmlEditorMode

    Icon

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

    Declaration
    [Parameter]
    public string Icon { get; set; }
    Property Value
    Type Description
    string

    IconColor

    Gets or sets the icon color.

    Declaration
    [Parameter]
    public string IconColor { get; set; }
    Property Value
    Type Description
    string

    The icon color.

    Selected

    Specifies whether the tool is selected.

    Declaration
    [Parameter]
    public bool Selected { get; set; }
    Property Value
    Type Description
    bool

    Template

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

    Declaration
    [Parameter]
    public RenderFragment<RadzenHtmlEditor> Template { get; set; }
    Property Value
    Type Description
    RenderFragment<RadzenHtmlEditor>

    Title

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

    Declaration
    [Parameter]
    public string Title { get; set; }
    Property Value
    Type Description
    string

    Visible

    Determines if the tools is visible.

    Declaration
    [Parameter]
    public bool Visible { get; set; }
    Property Value
    Type Description
    bool

    Methods

    BuildRenderTree(RenderTreeBuilder)

    A custom tool in RadzenHtmlEditor

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT