I've requirement that I need to replace the html tags in RTE, I checked find and replace plugin, which only replace the text not the tags. The CQ.form.rte.SearchableDocument returns the plain text. Can anybody tell me how to replace the tags?, is there any existing plugin's available ?
Thanks in advance
You can configure the rich text editor to use semantic markup, so that the bold=strong and italic=em will be modified in the html out. Not sure it applies for other tags. Give a try.
Thanks for the reply, I've requirement that have to replace <br> tags to <p> tags. I used the find replace plugin to achive that but unfortunately it not replacing the tags.
AFAIK there is no option OOB. Not sure if you looking for onetime replacement ex:- during migration Or in future also.
You might need to custom implement using html serilizer or overlaying rte postprocessHtml OR write own plugin.