Class RadzenHtmlEditorCustomTool
A custom tool in RadzenHtmlEditor
public class RadzenHtmlEditorCustomTool : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
- Inheritance
-
RadzenHtmlEditorCustomTool
- Implements
- Inherited Members
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()
public RadzenHtmlEditorCustomTool()
Properties
CommandName
[Parameter]
public string CommandName { get; set; }
Property Value
Disabled
Specifies whether the tool is disabled.
[Parameter]
public bool Disabled { get; set; }
Property Value
Editor
The RadzenHtmlEditor component which this tool is part of.
[CascadingParameter]
public RadzenHtmlEditor Editor { get; set; }
Property Value
EnabledModes
Specifies the modes that this tool will be enabled in.
[Parameter]
public HtmlEditorMode EnabledModes { get; set; }
Property Value
Icon
Specifies the icon of the tool. Set to "settings"
by default.
[Parameter]
public string Icon { get; set; }
Property Value
IconColor
Gets or sets the icon color.
[Parameter]
public string IconColor { get; set; }
Property Value
- string
The icon color.
Selected
Specifies whether the tool is selected.
[Parameter]
public bool Selected { get; set; }
Property Value
Template
The template of the tool. Use to render a custom tool.
[Parameter]
public RenderFragment<RadzenHtmlEditor> Template { get; set; }
Property Value
Title
Specifies the title (tooltip) displayed when the user hovers the tool.
[Parameter]
public string Title { get; set; }
Property Value
Visible
Determines if the tools is visible.
[Parameter]
public bool Visible { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder