我正在使用AEM 6.1 SP2,我试图在定位标记的href中启用'tel'属性以使点击调用功能性工作。我已经添加了'htmlRules'节点 ,并将htmlRules节点下的节点与'protocols'属性链接为[http://,https://,ftp://,tel :, mailto :, file://]'tel'属性在AEM 6.1的经典UI中富文本编辑器中的锚标记的href中不起作用
的“validateHref”在rte.js功能无法读取“协议”属性,并验证了“电话”属性是有效的,但不知道为什么“电话”属性不在作者对话框中单击“确定”时,坚持标记。
这是锚标记 -
<a style="color: #6c6c6c; text-decoration: underline;" class="tel" href="tel:1234 567 891">1234 567 89</a>
,这是它是如何呈现的页面上标记 -
<a style="color: rgb(108,108,108);text-decoration: underline;" class="tel">1234 567 89</a>
这是 'htmlRules' 节点XML -
<htmlRules jcr:primaryType="nt:unstructured">
<serializer jcr:primaryType="nt:unstructured">
<cleanup jcr:primaryType="nt:unstructured">
<pre
jcr:primaryType="nt:unstructured"
tagsToRemove="[\0]"/>
<post
jcr:primaryType="nt:unstructured"
tagsToRemove="[\0]"/>
<paste
jcr:primaryType="nt:unstructured"
tagsToRemove="[\0]"/>
</cleanup>
</serializer>
<links
jcr:primaryType="nt:unstructured"
protocols="[http://,https://,ftp://,tel:,mailto:,file://]"/>
</htmlRules>
你的配置看起来不错。链接检查器可能会丢弃它。你可以尝试在你的''标签中加入'x-cq-linkchecker =“skip”',这样linkchecker就排除了它。如果解决了这个问题,您可以将tel添加到linkchecker中的异常中。 –
感谢您的评论,我已经在linkchecker配置中添加了'tel'属性。我还在锚标记中添加了x-cq-linkchecker =“skip”,但是在提交对话框后它也被剥离了标记。您能否让我知道由于哪个tel属性没有被持久化而可能出现问题? – cqsapientuser