Opened 8 years ago
Closed 5 years ago
#40083 closed defect (bug) (worksforme)
if wp_editor is used in a metabox and you change 'visual' to 'text' and save, it affects the main editor too
Reported by: | shamai | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | close |
Focuses: | administration | Cc: |
Description
http://giphy.com/gifs/3o7btPiFRNQkPNH1Ys
Please view the gif above.
This shows the editor and a metabox editor using wp_editor.
When one is switched from 'visual' to 'text' the other switches on save.
Note: See
TracTickets for help on using
tickets.
This is expected behavior. Most users prefer either the Visual or the Text editor. The user preference for which editor to load first is "global".
In your plugin you can change the behavior by setting it to the state of one of the editors
onunload
. See: https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-admin/js/editor.js#L84 and https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-admin/js/editor.js#L115.