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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

RTE not including empty tags

gajanank2729265
Level 2
Level 2

Hi All,

 

We have added custom rte plugins in the Rich-text component in our project where we need to include some html markup using the source edit plugin.

 

Currently we are facing the issues while including the empty tags. E.g. <div class="some-class"></div>

We need to include this and there is some js which will target this class and add some functionality.

 

When we are trying to add this div, as it is empty rte is removing that div from the markup.

 

Is there any setting that need to be done in order to allow empty tags in the source edit plugins ?

 

Thanks in advance.

Gajanan

1 Accepted Solution
SureshDhulipudi
Correct answer by
Community Advisor
Community Advisor

Are you adding only empty tags? <div class="some-class"></div>

try adding a  <p>&nbsp;</p> <div class="some-class">&nbsp;</div>

View solution in original post

1 Reply
SureshDhulipudi
Correct answer by
Community Advisor
Community Advisor

Are you adding only empty tags? <div class="some-class"></div>

try adding a  <p>&nbsp;</p> <div class="some-class">&nbsp;</div>

View solution in original post