RTE not including empty tags | Community
Skip to main content
Level 2
November 30, 2020
Solved

RTE not including empty tags

  • November 30, 2020
  • 1 reply
  • 1347 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SureshDhulipudi

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

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

1 reply

SureshDhulipudi
Community Advisor
SureshDhulipudiCommunity AdvisorAccepted solution
Community Advisor
November 30, 2020

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

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