<p> </p> - Text & Image Component | Community
Skip to main content
Level 2
June 15, 2016
Solved

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

  • June 15, 2016
  • 3 replies
  • 1338 views

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.
Best answer by kautuk_sahni

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

3 replies

Peter_Puzanovs
Community Advisor
Community Advisor
June 16, 2016

Add following after closing the </rtePlugins>

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

Regards,

Peter

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
June 17, 2016

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
kautuk_sahni
Community Manager
Community Manager
June 23, 2016

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

Kautuk Sahni