[wp-trac] [WordPress Trac] #19173: Issues with wp_editor() when used inside of a meta box.

WordPress Trac noreply at wordpress.org
Sun Sep 13 23:35:51 UTC 2015


#19173: Issues with wp_editor() when used inside of a meta box.
--------------------------+-----------------------
 Reporter:  goto10        |       Owner:  azaozz
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  Editor        |     Version:  3.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------

Comment (by azaozz):

 Replying to [comment:22 pawelkmpt]:

 > content from visual editor disappears (but it still stays in text
 editor),
 > it's not possible to edit content in visual editor anymore

 This is a browser limitation. Happens because iframes cannot be moved
 safely in the DOM. They get reset/reloaded. If you look around, you'll
 probably find few old bug reports for Firefox and WebKit/Chrome that are
 closed as "wontfix".

 So there are two options to improve this:
 - "Lock" the contaier postbox so it cannot be dragged when using the
 visual editor (preferred).
 - Safe the content and destroy the editor instance on dragStart, then
 initialize the editor again and load the content on dragEnd. This is more
 complex and will make the dragging somewhat hard as processing and saving
 the editor content can be slow.

 IMHO the plugin that requires visual editor in a draggable container
 should decide which approach to use. We probably can add support for the
 first approach to wp_editor() when used in a postbox, but that's not a
 priority.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/19173#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list