Skip to content

962670: Corrected the code snippet in Blazor RichTextEditor documentation #6135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions blazor/rich-text-editor/tools/custom-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Refer to the following code sample for the custom tool with the tooltip text, wh
@using Syncfusion.Blazor.Buttons
@using Syncfusion.Blazor.RichTextEditor

<SfRichTextEditor>
<SfRichTextEditor @ref="RteObj">
<RichTextEditorToolbarSettings Items="@Tools">
<RichTextEditorCustomToolbarItems>
<RichTextEditorCustomToolbarItem Name="Symbol">
Expand All @@ -35,6 +35,7 @@ Refer to the following code sample for the custom tool with the tooltip text, wh
</SfRichTextEditor>

@code {
SfRichTextEditor RteObj;
private List<ToolbarItemModel> Tools = new List<ToolbarItemModel>()
{
new ToolbarItemModel() { Command = ToolbarCommand.Bold },
Expand All @@ -45,11 +46,11 @@ Refer to the following code sample for the custom tool with the tooltip text, wh
new ToolbarItemModel() { Command = ToolbarCommand.SourceCode },
new ToolbarItemModel() { Command = ToolbarCommand.FullScreen }
};
private void ClickHandler()
private async Task ClickHandler()
{
ExecuteCommandOption executeCommandOption = new ExecuteCommandOption();
executeCommandOption.Undo = true;
await this.RteObj.ExecuteCommandAsync(CommandName.InsertText, "₹", executeCommandOption);
await RteObj.ExecuteCommandAsync(CommandName.InsertText, "₹", executeCommandOption);
}
}

Expand Down