Skip to main content
Level 2
Jun 15, 2016 11:24 PM UTC
Solved

<p> </p> - Text & Image Component

Hi Guys,

Facing an issue with every out of the box Text & Image components including sightly. Whenever i am saving the component, it is adding <p> </p> between the lines and if i am open the component again and just click save, it is doubling the tags every time, even if I click "source edit" button in the RTE - Classic UI , on every click it is adding this tag. Page is showing lot of white spaces between the lines, please let me know what should be done to fix this issue.

We are using AEM 6.0 + SP2.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
kautuk_sahni
kautuk_sahniAccepted solution
Level 9
Jun 17, 2016 6:26 AM UTC

Hi 

As mentioned by "Peter"  removeSingleParagraphContainer="{Boolean}true" can do job for you.

To set the removeSingleParagraphContainer property, you'll need to create another child called blockHandling under your htmlRules node in your dialog. You don't need to mess with singeParagraphContainerReplacement property, but if you did, you would set it on the same node:

<rtePlugins jcr:primaryType="nt:unstructured">
    ...
</rtePlugins>
<htmlRules jcr:primaryType="nt:unstructured">
    <docType jcr:primaryType="nt:unstructured">
        ...
    </docType>
    <blockHandling
        jcr:primaryType="nt:unstructured"
        removeSingleParagraphContainer="{Boolean}true"/>
</htmlRules>

[img]http://i.stack.imgur.com/uxnqx.png[/img]

 

Documentation Link:- https://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html?class=CQ.form.RichText

Another Ways mentioned at in OLD Forum Post:-http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__atee-hi_i_need_torem.html

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni

3 replies

Peter_Puzanovs
Community Advisor
Community Advisor
Jun 16, 2016 9:30 AM UTC

Add following after closing the </rtePlugins>

<htmlRules jcr:primaryType="nt:unstructured"> <blockHandling jcr:primaryType="nt:unstructured" removeSingleParagraphContainer="{Boolean}true"/> </htmlRules>

Regards,

Peter

Translate
kautuk_sahni
kautuk_sahniAccepted solution
Level 9
Jun 17, 2016 6:26 AM UTC

Hi 

As mentioned by "Peter"  removeSingleParagraphContainer="{Boolean}true" can do job for you.

To set the removeSingleParagraphContainer property, you'll need to create another child called blockHandling under your htmlRules node in your dialog. You don't need to mess with singeParagraphContainerReplacement property, but if you did, you would set it on the same node:

<rtePlugins jcr:primaryType="nt:unstructured">
    ...
</rtePlugins>
<htmlRules jcr:primaryType="nt:unstructured">
    <docType jcr:primaryType="nt:unstructured">
        ...
    </docType>
    <blockHandling
        jcr:primaryType="nt:unstructured"
        removeSingleParagraphContainer="{Boolean}true"/>
</htmlRules>

[img]http://i.stack.imgur.com/uxnqx.png[/img]

 

Documentation Link:- https://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html?class=CQ.form.RichText

Another Ways mentioned at in OLD Forum Post:-http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__atee-hi_i_need_torem.html

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni

Translate
Kautuk Sahni
kautuk_sahni
Level 9
Jun 23, 2016 9:09 AM UTC

Hi

Can you please look at the answer posted and let us know if this worked for you or not.

If you have devised another way to resolve the issue, please post it in the community for communities benefit.

 

Thanks and Regards

Kautuk Sahni

Translate
Kautuk Sahni