[wp-trac] [WordPress Trac] #20181: tinyMCE script looks for a /simple theme that does not exist
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 25 16:07:10 UTC 2012
#20181: tinyMCE script looks for a /simple theme that does not exist
----------------------------+------------------------------
Reporter: helgatheviking | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: 3.4
Severity: normal | Resolution:
Keywords: close |
----------------------------+------------------------------
Comment (by needle):
I've come across the same reference to the non-existent file when using
`wp_editor()` in a theme to provide TinyMCE for the comment textarea.
Perhaps the following might help untangle what happens in cases like this.
It took me a while to understand what was going on, because two identical
installs exhibited different behaviours; ie, one loaded TinyMCE correctly,
the other failed and referenced the non-existent file `wp-
includes/js/tinymce/themes/simple/editor_template.js`.
It turned out that `wp_default_editor()` (called from line 555 of `class-
wp-editor.php`) was returning the "currently active" editor in the post
edit screen. In one install, my user had selected the HTML tab to edit a
post, and therefore TinyMCE never loaded for the `wp_editor()` instance in
the comment textarea. Nor was there a fallback because I had set
`'quicktags' => false`.
So, if you've set `'quicktags' => false` in your `wp_editor()` settings
for your metabox and you've got `HTML` as your currently active editor for
the post, you might well see TinyMCE fail to load. My solution was to use
the `wp_default_editor` filter to return `'tinymce'` for my instance.
Hope that helps.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20181#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list