josh18 / TinyMCE-FontAwesome-Plugin

A plugin that lets you insert FontAwesome icons via TinyMCE
MIT License
81 stars 40 forks source link

Ability to use unicode icons instead of named icons #58

Open katzenmayer opened 6 years ago

katzenmayer commented 6 years ago

Previous versions of your plugin were using the unicode of an icon instead of the class name. While using class names is trivial in a default setup of TinyMCE, it's nearly impossible to use it together with TinyMCE's valid_classes setting.

valid_classes does not accept wildcards like fa-* so you need to either add every possible icon class to valid_classes, or not use valid_classes at all.

With the unicode approach, only 2 classes would need to be added to valid_classes: fa and fa-spin

Perhaps it would be possible to make this a config option?

josh18 commented 6 years ago

Sorry I don't really use this anymore so probably won't be making any further changes to it. Happy to accept a PR though