Expand my Community achievements bar.

SOLVED

In RTE I want to add some html tag

Avatar

Level 7

I wanted to add some HTML tags in RTE; with CSS class names how can I achieve that? If there is any possible way to do so. 
For Del tag, I tried creating it from text component policy but

Ronnie09_0-1674247472692.png

Now if I click on Paragraph it won't let me select, once Strikethrough (del) tag is selected

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
4 Replies

Avatar

Community Advisor

Hi @Ronnie09 ,

 

If you want to use tags in RTE, I suggest using data-sly-element.

<div data-sly-element="${properties.tagName}">Blah</div>
<!--/* outputs: */-->
<h1>Blah</h1>
Follow these steps if this requirement is repetitive.
1.  Use the above code in the HTML of the RTE component.
2. Determine tag Name from author dialog
 
Hope this helps,
Aditya Ch
2. 
Thanks,

Aditya Chabuku

Avatar

Correct answer by
Community Advisor

Avatar

Level 4

Hi @Ronnie09 ,

 

You can use "Styles", which is another RTE plugin. The styles are implemented by adding <span> around the selected content therefore it will support multiple styles as well. Please see the documentation,

https://experienceleague.adobe.com/docs/experience-manager-64/administering/operations/configure-ric...

 

Thanks,