plone / mockup

A collection of client side patterns for faster and easier web development
http://plone.github.io/mockup/
BSD 3-Clause "New" or "Revised" License
47 stars 93 forks source link

Feature/help plugin #1376

Closed rber474 closed 5 days ago

rber474 commented 7 months ago

After issue https://github.com/plone/plone.base/issues/41, a PR was requested in order to make help plugin available throught TinyMCE controlpanel.

Checking this plugin option in would display a toolbar or menu options to show the help view in the editor but an exception was rised because of it could find the resources for navkey translation pages.

This aproach fixes that issue and refactors the code. Now help is displayed and translations are properly shown.

  1. Uses original plugin code but refactoring it to improve readability.
  2. Includes all navkey translation resources inside the mockup tinymce folder to solve the load error.
  3. Loads help.js in tinymce-implementation.js

I am not sure if this is the best way to solve the behaviour but I've implemented it in a production site and fits our needs.

Please, review it. Any comments are welcome.

@rber474

petschki commented 5 months ago

Just wondering why this is needed at all, because the help plugin is shipped with the tinymce package ... if the plugin is activated in the controlpanel (which got added in plone.base I think?) the pattern tries to import it here: https://github.com/plone/mockup/blob/master/src/pat/tinymce/tinymce--implementation.js#L162 ... to see the log.debug messages you need to add ?loglevel=DEBUG to the browser address then the messages are displayed in the console.

petschki commented 5 days ago

@rber474 I'll close this one. If you have any further problems with the help plugin please open a new PR.