Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

injecting custom css styles for html tags generated by RTE

mohanb
Level 4
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
kautuk_sahni
Correct answer by
Community Manager
Community Manager

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

View solution in original post

6 Replies
smacdonald2008
Level 10
Level 10

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

kautuk_sahni
Correct answer by
Community Manager
Community Manager

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

View solution in original post

vivianseba
Level 2
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 ?

vivianseba
Level 2
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 ?