injecting custom css styles for html tags generated by RTE | Community
Skip to main content
mohanb
Level 4
November 14, 2016
Solved

injecting custom css styles for html tags generated by RTE

  • November 14, 2016
  • 4 replies
  • 7042 views

Hi 

Is there any standard/ pre-defined way to inject styling information for html snippets generated from the rich text editor?

like <p> must be <p class="abc">  or adding attributes on the fly for html elements generated.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

For Custom Style plugin in RTE, 

Please refer to this community article:- 

Link:- https://mkbansal.wordpress.com/2016/01/09/aem-rte-custom-styles-plugin/

// AEM | RTE – Custom Styles Plugin

  1. RTE – Custom Styles Plugin – Touch UI
  2. RTE – Custom Styles Plugin – Classic UI

I hope this would help you.

~kautuk

4 replies

smacdonald2008
Level 10
November 14, 2016

Out of the box - no. However - there may be a way using code. I am looking into this. 

smacdonald2008
Level 10
November 14, 2016
kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
November 15, 2016

For Custom Style plugin in RTE, 

Please refer to this community article:- 

Link:- https://mkbansal.wordpress.com/2016/01/09/aem-rte-custom-styles-plugin/

// AEM | RTE – Custom Styles Plugin

  1. RTE – Custom Styles Plugin – Touch UI
  2. RTE – Custom Styles Plugin – Classic UI

I hope this would help you.

~kautuk

Kautuk Sahni
Level 2
May 21, 2020

Hi,

I am also facing the similar issue and i want to add the style into P tag like this <p style="margin-bottom:10px;"></p> while editing from RTE editor,

i am able to change via source edit,But is there anyway to add inline style to ptag ?

Level 2
May 21, 2020

Hi Ankur,

Thank you for sharing the link and do we have any other option to control the styles in html rules or rte dialog ?