[wp-trac] [WordPress Trac] #56039: Classic Editor: Current selection is not preserved when switching Visual to Text editor

WordPress Trac noreply at wordpress.org
Wed Jun 22 13:23:18 UTC 2022


#56039: Classic Editor: Current selection is not preserved when switching Visual to
Text editor
--------------------------+------------------------------
 Reporter:  shge          |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+------------------------------

Comment (by shge):

 Replying to [comment:4 joyously]:
 > Did you test this change with other `<span>` tags in the content?
 The editor surrounds the current selection with new `<span>` tags with
 `mce_SELRES_start` and `mce_SELRES_end` classes, so it works well with all
 tags including `<span>`.
 > Is there any way the selection ID could be there without that class?
 No, there isn't.
 Also, it should not conflict with existing classes because the selection
 ID is randomly generated and about 15 digits.

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


More information about the wp-trac mailing list