RTE style - remove/disable span generation | Community
Skip to main content
New Participant
May 9, 2022
Solved

RTE style - remove/disable span generation

  • May 9, 2022
  • 2 replies
  • 1447 views

Hi community,

 

We are running aem 6.5 SP8, will be upgrading to 12 shortly. 

Is there any way to disable the span generation when using RTE styles? I mean some OOTB way of doing things, we are aware we can create a custom plugin for styles that would do the same thing, but I am trying to see if we can override the OOTB options.

Current:

<h2> <span class="some-class"> some text </span></h2>

Expected:

<h2 class="some-class"> some text </h2>

Thanks in advance.

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 arunpatidar

Hi,

OOTB this is not possible.

You can create a custom plugin that adds class directly to h2.

 

2 replies

arunpatidar
arunpatidarAccepted solution
New Participant
May 10, 2022

Hi,

OOTB this is not possible.

You can create a custom plugin that adds class directly to h2.

 

Arun Patidar
Anmol_Bhardwaj
New Participant
May 10, 2022

For removing the <p> tag we have to create a node named htmlRules having jcr:primary type nt:unstructured. This node will have to create under the widget node which xtype is richtext.

jcr:primaryType = “nt:unstructured”

removeSingleParagraphContainer = “{Boolean}true”.
mitadianaAuthor
New Participant
May 10, 2022

Yeah, I have seen that p tag can be removed in this way. Was hoping for something similar for span tag.