Jump to content

Smart Quotes in Rich Text Editor


Recommended Posts

I have a product in my storefront that uses the Rich Text Editor settings from MarcomCentral. Within FusionPro, I have a JavaScript rule to fix Smart Quotes. This code works in a Plain Text Form Field.


field = field.replace(/"([^"]*)"/g, "“$1”").replace(/(\w)'(\w)/g, "$1’$2").replace(/'([^']*)'/g, "‘$1’");



This code does not work with the Rich Text Editor feature from MarcomCentral. The Rich Text Editor allows users to format text to be bold, italicized, centered, left aligned, etc.



Can someone assist with editing the code above to ignore any text found between HTML tags to allow this to work with the Rich Text Editor?




Link to comment
Share on other sites

  • Create New...