Skip to content

Commit 62890aa

Browse files
committed
chore: update kb content
1 parent eaa1f97 commit 62890aa

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

knowledge-base/editor-add-class-to-selected-text.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,21 @@ ticketid: 1679881
2222

2323
## Description
2424

25-
In certain situations, you might want to style the content within the [Editor for Blazor](slug:editor-overview) without relying on inline styles. Specifically, you might need to add CSS classes to `<div>` or `<span>` elements through the editor's toolbar. This knowledge base article guides you on how to add a toolbar custom tool that applies a `<p>` and a CSS class to selected text.
25+
In certain situations, you might want to style the content within the [Editor for Blazor](slug:editor-overview) without relying on inline styles. Specifically, you might need to add CSS class to specific element of the Editor cotent. This knowledge base article guides you on how to add a [Editor Custom Tool](slug:editor-custom-tools) that applies a `<p>` and a CSS class to selected text.
2626

2727
This knowledge base article also answers the following questions:
28+
2829
- How can I enhance text styling in the Editor for Blazor using CSS classes?
2930
- Is it possible to add a toolbar button in the Editor for Blazor that applies styling classes?
3031
- How do I use custom tools in the Editor for Blazor to manipulate text styling?
3132

3233
## Solution
3334

34-
To add a class to a `<p>` element or any other element using a toolbar button in the Telerik Editor, create a custom tool that applies the desired class. The following steps and example code illustrate how to achieve this functionality:
35-
36-
### Creating a Custom Tool
35+
To add a custom CSS class to a `<p>` element or any other element using the Editor toolbar button, create a custom tool that applies the desired class. The following steps and example code illustrate how to achieve this functionality:
3736

38-
1. **Define a Custom Tool:** Start by defining a custom tool in the Editor toolbar. This tool will specifically target the selected text and apply a CSS class to it.
37+
1. Define a Custom Tool in the Editor toolbar. This tool will specifically target the selected text and apply a CSS class to it.
3938

40-
2. **Leverage JavaScript Interop:** Utilize JavaScript Interop to get the selected text.
39+
2. Use JavaScript Interop to get the selected text.
4140

4241
````RAZOR
4342
@using Telerik.Blazor.Components.Editor
@@ -94,5 +93,5 @@ To add a class to a `<p>` element or any other element using a toolbar button in
9493

9594
- [Editor Overview](slug:editor-overview)
9695
- [JavaScript Interop in Blazor](https://docs.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability)
97-
- [Editor Custom Tools](slug:custom-tools)
98-
- [How to Get Selected Text in Editor](slug:editor-get-selection)
96+
- [Editor Custom Tools](slug:editor-custom-tools)
97+
- [How to Get Selected Text in Editor](slug:editor-kb-get-selection)

0 commit comments

Comments
 (0)