-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
💡 Rename wp-tinymce.js to wp-tinymce.min.js #1396
Comments
This sounds like a good idea. I just did a quick test and TinyMCE seems to work fine. However, we can't implement this until version 3 at the earliest. That's because it would be a breaking change, i.e. plugins and themes might be relying on this script, and won't find it if we change its name. Because we are following semantic versioning, we can't make a breaking change until the next major version of ClassicPress, which will be version 3. But then there's also the question of whether ClassicPress will even still be using TinyMCE by the time we get to version 3. The current version of TinyMCE is very old and no longer maintained. We need to decide whether to update it to a newer version or to move to an alternative editor. There have been discussions about that on Zulip, but no decision has yet been taken. Feel free to try out Tiny v6, Toast UI, Quill.js, CKEditor, and others you come across to see if you have a preference. |
I understand your concern about plugins and themes relying on this script, of course. But since this script is already being registered using |
Any change here would need to account for the build steps. wp-tinymce.js is a dynamic and built file created during core code build: Lines 759 to 773 in be5c1e8
There is no unminified file and added a dynamic suffix for dev environments would not work. |
Context
The file
wp-tinymce.js
, located in/wp-includes/js/tinymce/
, is currently named as unminified.Yet the content is minified, because it combines the minified versions of the scripts
/wp-includes/js/tinymce/tinymce.js
and/wp-includes/js/tinymce/plugins/compat3x/plugin.js
into one file.Line 98 of
/wp-includes/script-loader.php
determines if a compressed version should be loaded, but uses an uncompressed file extension for this.Benefits of renaming this file:
min.js
files are excluded by default using the WP-CLI commandwp i18n make-pot
.pot
file.Possible implemantion
No response
Possible Solution
/wp-includes/js/tinymce/wp-tinymce.js
to/wp-includes/js/tinymce/wp-tinymce.min.js
./wp-includes/script-loader.php
, line 98.From:
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.js', array(), $tinymce_version );
To:
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.min.js', array(), $tinymce_version );
Will you be able to help with the implementation?
signed up
The text was updated successfully, but these errors were encountered: