nytimes / ice

track changes with javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IceSmartQuotesPlugin not working

jamienk opened this issue · comments

I can't get the IceSmartQuotesPlugin to work. I see it's also not working the demo http://nytimes.github.io/ice/demo/.

The first tracked ContentEditable there includes these plugins:

plugins : ['IceAddTitlePlugin', 'IceSmartQuotesPlugin', 'IceEmdashPlugin'

But when you type "this is a test" (with the quotes), the quotes are not converted. Tested in Firefox and Chrome

The smart quotes plugin was created to use with tinymce. In tinymce, you can execute ed.execCommand('ice_smartquotes') (usually after a custom button is clicked) to convert all of the quotes in the editor body. You can trigger the plugin manually with the following:

iceInstance.pluginsManager.plugins['IceSmartQuotesPlugin'].convert(bodyElement);

Hm. I've tried this and it seems to work well with ICE http://sujeetgholap.github.io/typesmart.js/

Looks cool! It could potentially be used as a library for ice.