Skip to content

Commit 4fa268c

Browse files
authored
Merge pull request #6135 from syncfusion-content/962670-CusDev
962670: Corrected the code snippet in Blazor RichTextEditor documentation
2 parents 1274786 + b6db5e6 commit 4fa268c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

blazor/rich-text-editor/tools/custom-tool.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Refer to the following code sample for the custom tool with the tooltip text, wh
2121
@using Syncfusion.Blazor.Buttons
2222
@using Syncfusion.Blazor.RichTextEditor
2323

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

3737
@code {
38+
SfRichTextEditor RteObj;
3839
private List<ToolbarItemModel> Tools = new List<ToolbarItemModel>()
3940
{
4041
new ToolbarItemModel() { Command = ToolbarCommand.Bold },
@@ -45,11 +46,11 @@ Refer to the following code sample for the custom tool with the tooltip text, wh
4546
new ToolbarItemModel() { Command = ToolbarCommand.SourceCode },
4647
new ToolbarItemModel() { Command = ToolbarCommand.FullScreen }
4748
};
48-
private void ClickHandler()
49+
private async Task ClickHandler()
4950
{
5051
ExecuteCommandOption executeCommandOption = new ExecuteCommandOption();
5152
executeCommandOption.Undo = true;
52-
await this.RteObj.ExecuteCommandAsync(CommandName.InsertText, "₹", executeCommandOption);
53+
await RteObj.ExecuteCommandAsync(CommandName.InsertText, "₹", executeCommandOption);
5354
}
5455
}
5556

0 commit comments

Comments
 (0)