Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/help plugin #1376

Closed
wants to merge 16 commits into from
Closed

Feature/help plugin #1376

wants to merge 16 commits into from

Conversation

rber474
Copy link
Member

@rber474 rber474 commented Mar 5, 2024

After issue plone/plone.base#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

@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit
# yarn commitlint --edit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably a leftover?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm... nothing I recall to have changed. Will restore and commit original state

Copy link
Member Author

@rber474 rber474 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed commented line and a couple of errors.

@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit
# yarn commitlint --edit
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm... nothing I recall to have changed. Will restore and commit original state

@petschki
Copy link
Member

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
Copy link
Member

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

@petschki petschki closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants