Hi community,
in aem 6.5, how can i customize bold <b> tag into <strong>?
i have tried with:
<htmlRules jcr:primaryType="nt:unstructured">
<docType jcr:primaryType="nt:unstructured">
<typeConfig jcr:primaryType="nt:unstructured">
<semanticMarkupMap jcr:primaryType="nt:unstructured"
strong="b"/>
</typeConfig>
</docType>
</htmlRules>
but it seems that the replacement is random (not stable). sometime it's work and sometime no. debugging the clientlibs: /libs/clientlibs/granite/richtext.js i saw the "deprecated" word:
and during the
this.elementsToChange = clear(this.elementsToChange);
the list sometime is 0 and other time is correctly catched!
What i'm wrong? my suspect is related to the "<strong>" tag acceptance.. seems that from this customization the tag is replaced and from another side, the tag is converted againt into <b>.
tks,
Solved! Go to Solution.
Views
Replies
Total Likes
Did you try adding the below code? It works perfectly fine for me on AEM 6.5.9.0. It works in any AEM 6.5 version as I am using it from 6.5.3.0 onwards.
<htmlRules jcr:primaryType="nt:unstructured">
<docType jcr:primaryType="nt:unstructured">
<typeConfig
jcr:primaryType="nt:unstructured"
isXhtmlStrict="{Boolean}true"
useSemanticMarkup="{Boolean}true"/>
</docType>
</htmlRules>
Thanks!
Did you try adding the below code? It works perfectly fine for me on AEM 6.5.9.0. It works in any AEM 6.5 version as I am using it from 6.5.3.0 onwards.
<htmlRules jcr:primaryType="nt:unstructured">
<docType jcr:primaryType="nt:unstructured">
<typeConfig
jcr:primaryType="nt:unstructured"
isXhtmlStrict="{Boolean}true"
useSemanticMarkup="{Boolean}true"/>
</docType>
</htmlRules>
Thanks!
Hi @davidef34326447,
The culprit is markup map node which says to map strong as b(strong="b") instead of b to strong(b="strong")
You can update the typeConfig node as @Asutosh_Jena_ mentioned and remove the semanticmarkupMap node
Views
Likes
Replies
Views
Likes
Replies