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

WordPress Trac noreply at wordpress.org
Wed Jun 21 23:21:11 UTC 2017


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

Comment (by westonruter):

 @synavista yes, this will be part of 4.8.1

 @FolioVision:

 > Thanks Weston for the update on current status and the detailed summary
 of the offsite discussion.

 Actually, it wasn't offsite. It was in Slack, in an open meeting. I
 literally copy/pasted here what I pasted into Slack. I was going to
 include it here regardless.

 > It's more a face saver for the original very wrong policy. What would be
 reliable and simple would be: To detect the kind of widget. If it's an
 older text widget just leave it as a text widget. Nothing breaks on 4.8.1
 upgrades.

 It's not a face saver solution. I honestly think it's the best solution
 and a legacy mode should have been done this way from the start. It has in
 mind both the best interests of the majority of users who are novices with
 basic HTML (or zero HTML with just plain text), and also the interests of
 advanced users with custom HTML. The Text widget should have had TinyMCE
 when it was first introduced in WordPress 2.2.

 It may be that the compatibility detection is not feasible to detect
 whether a Text widget can be upgraded to use the TinyMCE by inspecting the
 widget instance, and in such case the preexisting widgets could always be
 in legacy mode. I think the detection can be done, however. For example,
 if a widget's text has no line breaks or if it has the autop checkbox
 enabled, and if there are only `strong`, `em`, `a[href]`, `img`, `ul`,
 `ol`, `li` tags in the content, without any other attributes added to the
 elements, then there would not be anything in the widget that would be
 incompatible with TinyMCE.

 Naturally, we'll be looking to all your guys's help to test and confirm
 any assumptions that the widget takes in its legacy mode. Thanks all.

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


More information about the wp-trac mailing list