May 15, 2020
Estimated Post Reading Time ~ < 1 Min

Remove p tag from RTE in AEM

In this post, I will explain how to remove <p> tag from RTE (Rich text editor) in AEM.

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.

In my case, I have created a node named “heading with property xtype = richext“ and created a node named as htmlRules under this node.

Screenshot+from+2015-09-07+14%253A30%253A24

Now you have to create a node named as blockHandling under the htmlRules node and add properties as

jcr:primaryType = “nt:unstructured” and
removeSingleParagraphContainer = “{Boolean}true”.

Screenshot+from+2015-09-07+14%253A32%253A33

Now go back to your content page and refresh it. Add a line in RTE and click on Ok. Now you find that <p> tag has been removed from the rich text.
aem4beginner.blogspot


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.

Ad Blocker Detected :(

Please consider supporting us by disabling your ad blocker.

Please Disable your adblocker and Refresh the page to view the site content.