[wp-trac] [WordPress Trac] #40951: New Text Widget - Switching Between Visual/Text Editor Strips Out Code

WordPress Trac noreply at wordpress.org
Mon Jun 26 14:52:54 UTC 2017


#40951: New Text Widget - Switching Between Visual/Text Editor Strips Out Code
-------------------------------------------------+-------------------------
 Reporter:  dwrippe                              |       Owner:
     Type:  defect (bug)                         |  westonruter
 Priority:  normal                               |      Status:  accepted
Component:  Widgets                              |   Milestone:  4.8.1
 Severity:  major                                |     Version:  4.8
 Keywords:  needs-testing has-unit-tests has-    |  Resolution:
  patch                                          |     Focuses:
-------------------------------------------------+-------------------------

Comment (by jdcohan):

 +100 for this.
 Replying to [comment:37 synavista]:
 > The more I think about (and deal with) this situation on the sites I
 manage, the more I'm convinced that it was (unfortunately) poor planning
 to take an existing widget that openly allowed "Arbitrary Text and HTML"
 (whether "proper" HTML or not) and then alter it's functionality such that
 people could no longer use it as it was previously available to be used.
 >
 > The Text Widget is what should have been converted to the HTML Code
 widget, and something like a "Rich Text Editor" should have been added. A
 note to the user to "Check out the new Rich Text Editor" could be present
 on the original widget, notifying users to the newly available
 functionality. This way everyone who has existing content (no matter what)
 in a widget won't be affected, and people who wanted to use the new widget
 could do so on their own accord.
 >
 > Additionally, based on the discussion in both #40907 and #core, it
 seemed like the decision to get the new Text Widget released was more
 important than, at a minimum, simultaneously releasing an HTML Code
 alternative and, at best, developing a solution that, while maybe not the
 absolute best user experience, at least didn't affect actual content and
 functionality and a root user level.
 >
 > The option of A) replacing the new text widget with an unsupported
 "classic text widget" plugin, and modifying database tables to
 accommodate, is terribly inconvenient, and the option of B) modifying core
 files is absolutely not going to happen (every developer knows NOT to go
 editing core files).
 >
 > The best course of action at this point, it would seem, would be to
 admit the error, convert the text editor back to the way it was, and
 simultaneously release the updated HTML Code widget along with a new Rich
 Text Editor. If that is completely impossible, at least figure out a way
 for the TinyMCE Text Editor to both default to the text editor AND
 remember the selected editor type (which I would hope would stop the
 system from stripping out existing content). That makes it a pain in the
 butt for developers to go in and convert to the new HTML Code widget, but
 '''at least it makes it possible.'''

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


More information about the wp-trac mailing list