[wp-trac] [WordPress Trac] #40951: New Text Widget - Switching Between Visual/Text Editor Strips Out Code
WordPress Trac
noreply at wordpress.org
Thu Jun 22 09:31:05 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 majick):
This is a bit of a complex one to approach since we now have to deal with:
1. As yet unchanged Text Widget content (pre-4.8)
2. Possibly modified Text Widget content (post-4.8)
3. New User Content (post-4.8)
Since rolling back is unlikely to be backwards-compatible with going
forward (lolz) I'd like to propose an alternative solution...
1. Make **TinyMCE Disabled by Default** in the current (new) "Text Widget"
2. Add a checkbox to the current Text Widget options to Enable TinyMCE for
that Widget instance.
3. Add a message "Please recheck your formatting if switching to Visual
Text" when box is checked.
4. Add a "new" Widget (class extend?) called "Visual Text" with **TinyMCE
Enabled by Default** (thus with the checkbox already checked also.)
5. Let users choose whether to use the old or new Widget when adding it,
the only difference really being that TinyMCE is enabled or disabled by
default depending on which type is added, "Text" or "Visual Text" (ie.
keep the class names etc. the same to prevent CSS change of targeting
problems as already noted.)
Best of both worlds. Existing Text Widgets content not affected, and
minimal breakage going forward.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40951#comment:70>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list