Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Community Advisor

Add following after closing the </rtePlugins>

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

Regards,

Peter

Avatar

Correct answer by
Administrator

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

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Administrator

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