2

I do not see the templates plugin under available buttons in my text format

How do I get the templates plugin to show up?

0

You have to build a plugin in Drupal using the CKEditor classes in the CKEditor module in core, it is not an automatic integration.

Check some of the existing modules that integrate plugins for examples on how to do this.

Checkout:

  • Slow progress. Noticing that the ckeditor_font module together with the font add-on from ckeditor.com works so well, I created a ckeditor_templates based on the ckeditor_font module, module and put the Content Templates add-on from ckeditor into d8site/library/ This works! I can see the templates when creating content. But when I remove or add new templates to the D8site/library/templates/templates/default.js, I do NOT see my changes. – user551799 Apr 19 '16 at 16:30
  • the templates add-on was placed in the d8site/libraries folder – user551799 Apr 19 '16 at 17:30
  • I have noticed that there is a particular quirk with caching of CKEditor plugins where clearing Drupal cache or cache-rebuild does not get new changes to plugin js. I verified by comparing my source in my browser to the JS file, even with aggregation off. Try seeing if your updated plugin code is in the JS file the browser sees. – Kevin Apr 19 '16 at 18:13
  • FYI - Got it working!!!! In the file d8site/lbraries/templates/plugin.js on line 81, I changed the path to point to '/libraries/templates/templates/default.js' and that made use my templates file. – user551799 Apr 20 '16 at 0:02
  • Hm, not familiar with why the CKEditor plugin would need modification, but welcome to the quick world of plugin integration. Contribute back on d.o. If it is useful. – Kevin Apr 20 '16 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.