Saturday, 11 July 2015

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 as htmlRules having jcr:primary type nt:unstructuredThis node will have to create under the widget node which xtype is richtext.

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


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".


Now go back 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.



Be Happy 

2 comments: