nytimes / ice

track changes with javascript
Other
1.71k stars 194 forks source link

IceSmartQuotesPlugin not working #101

Closed jamienk closed 10 years ago

jamienk commented 10 years ago

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

delambo commented 10 years ago

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);

jamienk commented 10 years ago

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

delambo commented 10 years ago

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