[wp-trac] [WordPress Trac] #32425: Update WP_Editors and TinyMCE initialization
WordPress Trac
noreply at wordpress.org
Mon May 18 00:37:14 UTC 2015
#32425: Update WP_Editors and TinyMCE initialization
-------------------------+------------------
Reporter: azaozz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.3
Component: TinyMCE | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------
Changes (by azaozz):
* keywords: => has-patch
Comment:
In 32425.patch:
- Replace `wp_richedit_pre()` and `wp_htmledit_pre()` with
`format_for_editor()`. Deprecate the old functions and filters. Add back-
compat for the filters. The new function only runs the content through
`htmlspecialchars()`, same as `wp_htmledit_pre()`. If TinyMCE is loaded
first, the content is run through the JS wpautop() on initializing the
editor.
- Update editor.js to use `tinymce.$`.
- Update WP_Editors, remove the unneeded filter swapping and add some more
escaping.
- When Quicktags is used, add the toolbar div from PHP. This stops the
Text editor from "jumping" on page load.
Still to do: maybe move the JS `wpautop()` and `preWpautop()` to the
'wordpress' TinyMCE plugin so they are available without needing to load
editor.js. That makes it a bit easier/cleaner to use only TinyMCE.
Alternatively we can add them in the same file as the plugin but without
being a part of it, then define them in something like `tinymce.wp.*`.
Also wondering about the back-compat for the jQuery events on running the
content through wpautop and preWpautop.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32425#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list