Make WordPress Core

Opened 16 months ago

Last modified 16 months ago

#40083 new defect (bug)

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: Awaiting Review Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords: close
Focuses: administration Cc:



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.

Change History (1)

#1 @azaozz
16 months ago

  • Keywords close added
  • Version 4.7.3 deleted

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.

Last edited 16 months ago by azaozz (previous) (diff)
Note: See TracTickets for help on using tickets.