【发布时间】:2013-07-31 08:27:35
【问题描述】:
我正在尝试在 CQ5(版本 5.6.0.20130125)中删除 <p> 标签的自动添加。我尝试将这些属性添加到我正在使用的text component,但没有效果。(source)
removeSingleParagraphContainer true
singeParagraphContainerReplacement (empty string)
我也试过this solution。同样,没有效果。
是否可以禁用<p>标签的自动添加?
感谢您的任何想法
EDIT 我已经尝试过this answer,但CQ 仍然在我的代码中添加了<p> 标签。例如,我有这个 HTML 代码
<strong>Headquarters:</strong>
<p>MY - COMPANY a.s.<br>
Random Street 77<br>
Random City</p>
提交后,代码变为
<p><strong>Headquarters:</strong></p>
<p>MY - COMPANY a.s.<br>
Random Street 77<br>
Random City</p>
我的 RTE 看起来像这样
<text jcr:primaryType="cq:widget"
hideLabel="{Boolean}true"
name="./text"
xtype="richtext">
<htmlRules jcr:primaryType="nt:unstructured">
<docType jcr:primaryType="nt:unstructured">
...
</docType>
<blockHandling
jcr:primaryType="nt:unstructured"
removeSingleParagraphContainer="{Boolean}true"/>
</htmlRules>
</text>
【问题讨论】:
标签: html aem rich-text-editor