Files
radzen-blazor/Radzen.Blazor/RadzenHtmlEditorButtonBase.cs
Vladimir Enchev 16cca6572c XML comments added
2021-10-07 11:35:29 +03:00

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);
}
}
}