injecting custom css styles for html tags generated by RTE

Avatar

Avatar

mohanb

Avatar

mohanb

mohanb

14-11-2016

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

961

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

961

Correct Answer

1.1K
kautuk_sahni
Community Manager

15-11-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

Answers (3)

Answers (3)

Avatar

Avatar

vivianseba

Avatar

vivianseba

vivianseba

21-05-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 ?

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

14-11-2016

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

14-11-2016

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