Question

How can I force CKEditor to automatically convert special Characters to HTML Numbers?

For example when I write 6% in the editor and then look at the source code I get <p>6%</p> but what I want to get in the source is <p>6&#37;</p>

Is this possible?

Thanks

Was it helpful?

Solution

Check this option config.entities and all other entities_* options. Using them, you can configure editor to produce entities only for nbsp, gt, lt and amp. It is also possible to switch that off (check config.basicEntities), but it may causes issues as noted in docs.

OTHER TIPS

CKEDITOR.config.entities_additional = '#36,#37'; //$,%

Please, check too:

CKEDITOR.config.entities_processNumerical = 'force';
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top