rte format plugin
Hi,
i need to modify the structure of the plugin format of a rte. Is it possible to change the tag B to the tag STRONG?
Thanks
Hi,
i need to modify the structure of the plugin format of a rte. Is it possible to change the tag B to the tag STRONG?
Thanks
Hi
The Approach that you would need to achieve this is Overlay.
The approach of copying the relevant js, /libs/cq/ui/rte/core/commands/DefaultFormatting.js and adding it under the apps content folder, /apps/cq/ui/rte/core/commands/DefaultFormatting.js I then amended the copy of DefaultFormatting.js copied under apps. AEM then seems to use the 'overlay' technique to apply the strong tag.
Look at this Stackoverflow link :- http://stackoverflow.com/questions/17946117/strong-tag-getting-replaced-to-b-tag-in-cq5
//
you can update the map with an identity mapping (i.e. map b tags to b tags) so that nothing gets changed.
Add an htmlRules node like the following to your dialog.xml (as a sibling of the rtePlugins node):
...<rtePlugins jcr:primaryType="nt:unstructured">...<misctoolsjcr:primaryType="nt:unstructured"features="sourceedit"/></rtePlugins><htmlRules jcr:primaryType="nt:unstructured"><docType jcr:primaryType="nt:unstructured"><typeConfig jcr:primaryType="nt:unstructured"><semanticMarkupMap jcr:primaryType="nt:unstructured"b="b"i="i"/></typeConfig></docType></htmlRules>... ...or you can add nodes directly to your dialog in CRXDE Lite if you're not using maven or something similar (this screenshot shows the default, unmodified <i> to <em> mapping -- don't forget to change that if that's not what you want):

And to understand Overlay example :- http://experience-aem.blogspot.in/2014/02/aem-cq-56-extend-richtext-editor-add-new-plugin-pullquote.html
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.