Opened 2 years ago
Closed 2 years ago
#45117 closed defect (bug) (duplicate)
Fix defining of the TinyMCE settings in script-loader
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
Following up from [43723] and https://github.com/WordPress/gutenberg/issues/8670.
[43723] copied some of the ThinMCE init array settings from class-wp-editor.php
to script-loader.php
. However it didn't include the "translation" from PHP to JS which resulted in the above GH issue. Similar problems (with JSON encoded strings) may exist in other complex TinyMCE settings added by plugins, like style_formats_merge
formats
, etc. see https://www.tiny.cloud/docs/configure/content-formatting/#formats.
Change History (3)
This ticket was mentioned in Slack in #core by azaozz. View the logs.
2 years ago
Note: See
TracTickets for help on using
tickets.
Ideally the TinyMCE init settings should be abstracted in
class-wp-editor.php
and then used in script-loader. If that's likely to cause problems and we must duplicate that code (needs more looking into), we should add the "by-hand" translation from PHP to JS for the settings array, see https://core.trac.wordpress.org/browser/branches/5.0/src/wp-includes/class-wp-editor.php#L723.That will also support using a JS function for some settings, which is somewhat common.