我正在尝试删除<p>
CQ5(版本 5.6.0.20130125)中标签的自动添加。我试图将这些属性添加到我正在使用但没有效果的文本组件中。(来源)
removeSingleParagraphContainer true
singeParagraphContainerReplacement (empty string)
我也试过这个解决方案。再次,没有效果。
是否可以禁用自动添加<p>
标签?
感谢您的任何想法
编辑我已经尝试过这个答案,但 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>