mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-04 05:35:44 +00:00
35 lines
953 B
C#
35 lines
953 B
C#
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace Radzen.Blazor
|
|
{
|
|
/// <summary>
|
|
/// Class RadzenHtmlEditorButtonBase.
|
|
/// Implements the <see cref="ComponentBase" />
|
|
/// </summary>
|
|
/// <seealso cref="ComponentBase" />
|
|
public abstract class RadzenHtmlEditorButtonBase : ComponentBase
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the editor.
|
|
/// </summary>
|
|
/// <value>The editor.</value>
|
|
[CascadingParameter]
|
|
public RadzenHtmlEditor Editor { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets the name of the command.
|
|
/// </summary>
|
|
/// <value>The name of the command.</value>
|
|
protected virtual string CommandName { get; }
|
|
|
|
/// <summary>
|
|
/// Called when [click].
|
|
/// </summary>
|
|
protected virtual async Task OnClick()
|
|
{
|
|
await Editor.ExecuteCommandAsync(CommandName);
|
|
}
|
|
}
|
|
}
|