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

Fix Plugins Assets in FroalaHelper.php #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

w-mazed
Copy link

@w-mazed w-mazed commented Sep 23, 2019

I noticed that the helper loaded all the assets of the froala plugins without taking in consideration the array of plugins passed at the call function (editor function), that's why I changed the helper to load only the assets of the mentionned plugins.

So, I made two major edit at the helper .\src\View\Helper\FroalaHelper.php:

  1. I used two arrays ($js_files and $css_files) to load the assets of each plugins, I put conditions to check if the plugin is required or not to load it assets.
  2. I call the plugin function on the editor function (CakePHP doesn't load same files two times).

Sorry for my bad english.

  • Best regards.

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.

1 participant