Update the TinyMCE initialization:

- Replace `wp_htmledit_pre()` and `wp_richedit_pre()` with `format_for_editor()`.
- Replace the `'htmledit_pre'` and `'richedit_pre'` filters with `'format_for_editor'`.
- Do not run the post content through `wpautop()` in PHP when the visual editor is default. Run the textarea content through the JS wpautop on initializing TinyMCE.
- Simplify both editors initialization.
- Improve setting of `wpActiveEditor` in Quicktags.
- Improve editor.js, use `tinymce.$` when possible.
See #32425.

git-svn-id: https://develop.svn.wordpress.org/trunk@32899 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2015-06-21 22:00:42 +00:00
parent d54302da5e
commit e366658072
9 changed files with 577 additions and 465 deletions

View File

@@ -286,7 +286,6 @@ div.mce-path {
.mce-path-item,
.mce-path .mce-divider {
font-size: 12px;
line-height: 18px;
}
.mce-toolbar .mce-btn,
@@ -1059,6 +1058,7 @@ i.mce-i-wp_code:before {
position: relative;
border-bottom: 1px solid #dedede;
background: #f5f5f5;
min-height: 30px;
}
.has-dfw .quicktags-toolbar {