injecting custom css styles for html tags generated by RTE

Avatar

Avatar
Validate 10
Level 3
mohanb
Level 3

Likes

17 likes

Total Posts

76 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
mohanb
Level 3

Likes

17 likes

Total Posts

76 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
mohanb
Level 3

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
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
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
Validate 1
Level 1
vivianseba
Level 1

Likes

0 likes

Total Posts

20 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
View profile

Avatar
Validate 1
Level 1
vivianseba
Level 1

Likes

0 likes

Total Posts

20 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
View profile
vivianseba
Level 1

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
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

14-11-2016

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

14-11-2016

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