brstuff / ckawesome

CKAwesome is a Font Awesome plugin for CKEditor.
http://io.brstuff.com/ckawesome/
GNU General Public License v3.0
4 stars 6 forks source link

Load Select2 only after opening dialog #7

Open smartcorestudio opened 6 years ago

smartcorestudio commented 6 years ago

Is it possible to move loading of Select2 to the dialog, not the plugin itself? In my case users need this plugin quite rarely, so for the most cases downloading of about 100 Kilos of unused CSS and JS code is redundant. I don't know if it's possible here, but I've found an example of loading extra scripts inside "dialog.js" for example here: https://github.com/ranelpadon/ckeditor-leaflet/blob/master/dialogs/leaflet.js (lines 53-60)