Expand my Community achievements bar.

SOLVED

injecting custom css styles for html tags generated by RTE

Avatar

Level 4

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.

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

6 Replies

Avatar

Level 10

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

Avatar

Correct answer by
Administrator

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

Avatar

Level 2

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 ?

Avatar

Level 2

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 ?