#42029 closed task (blessed) (fixed)
Editor: Improve keeping text selection between Visual and Text modes
Reported by: | biskobe | Owned by: | iseulde |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Editor | Keywords: | has-patch needs-testing |
Focuses: | javascript | Cc: |
Description
This patch is a continuation from #41962 / [41630].
What's new?
- Shortcodes should no longer break when selecting them from text mode and switching to Visual mode.
- No longer inserting empty paragraphs where the selection markers were, when going back and forth between Visual and Text modes.
- Live Preview shortcodes should now be properly selected in Text mode, when they were selected in Visual mode.
- Other general bug fixes and code improvements.
To test
- Apply patch
- Open the editor
- Add content, click around, select things
- Switch between modes
- Try adding embeds
- Try adding shortcodes
Look for JS errors in the console, weird behavior, etc.
Feedback
Please, add any feedback as a comment here or as a comment on the development PR, linked below.
Attachments (1)
Change History (20)
#1
@
7 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 4.9
- Version set to trunk
#5
@
7 years ago
Still to do:
- There are couple of places where Underscore/Lodash is used, but it is not guaranteed it will be available. Refactor them to use similar helper methods in
window.tinymce
. - Add support for disabling this from the editor settings?
- Perhaps use
editor.on( 'beforeGetContent', ...)
to always remove the selection marker. Can filter the editor DOM before serializing. This will remove it on switching editors, on saving, and when other plugins extract (some of) the content.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
#9
@
7 years ago
- Type changed from enhancement to task (blessed)
Converting to task per the 4.9 bug scrub earlier today.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
#11
@
7 years ago
- Owner set to iseulde
- Status changed from new to assigned
@iseulde Could you check if this needs any more work please?
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
#14
@
7 years ago
From https://wordpress.slack.com/archives/C02RQBWTW/p1509034012000623 it seems that this ticket can be closed with all issues addressed. If there's anything else left, let's open new tickets for it.
In 41645: