Class RadzenHtmlEditorCustomTool
A custom tool in RadzenHtmlEditor
Inheritance
System.Object
RadzenHtmlEditorCustomTool
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenHtmlEditorCustomTool : object
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
Declaration
public string CommandName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Disabled
Specifies whether the tool is disabled.
Declaration
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Editor
The RadzenHtmlEditor component which this tool is part of.
Declaration
public RadzenHtmlEditor Editor { get; set; }
Property Value
Type | Description |
---|---|
RadzenHtmlEditor |
EnabledModes
Specifies the modes that this tool will be enabled in.
Declaration
public HtmlEditorMode EnabledModes { get; set; }
Property Value
Type | Description |
---|---|
HtmlEditorMode |
Icon
Specifies the icon of the tool. Set to "settings"
by default.
Declaration
public string Icon { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IconColor
Gets or sets the icon color.
Declaration
public string IconColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | The icon color. |
Selected
Specifies whether the tool is selected.
Declaration
public bool Selected { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Template
The template of the tool. Use to render a custom tool.
Declaration
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
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Visible
Determines if the tools is visible.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |