[wp-trac] [WordPress Trac] #52308: WordPress Editor does not preserve "blank" (empty) lines in Code/Text mode
WordPress Trac
noreply at wordpress.org
Fri Jan 15 13:51:13 UTC 2021
#52308: WordPress Editor does not preserve "blank" (empty) lines in Code/Text mode
--------------------------+-----------------------------
Reporter: Darko A7 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Keywords:
Focuses: javascript |
--------------------------+-----------------------------
This issue exists in WordPress Classic (TinyMCE) Editor for ages, and
similar issue exists in new Block editor, when used in Code mode.
I will try to explain it as briefly as possible, but there's a video
attached for a quick demonstration, as well.
**1) WordPress Block Editor**
- Switch to Code mode
- Type a lot of html text with some tags (e.g. h3, h4, h5 sections and
paragraphs)
- Whenever you insert an empty line between title tags (h1-h6), on scroll
action Editor will remove them! This condenses all the text and makes our
brains short circuiting e.g. we can no longer easily visualize different
paragraphs and sections when working with huge amount of text / lengthy
articles!
This behavior should be fixed / js code that is doing this must be
optional and left disabled, if we desire so. Or removed completely, as it
is counter-intuitive and counter-productive.
**2) WordPress Classic Editor**
- Situation with Classic editor is little better. As long as we stay in
Text mode, editor will keep our line spacings between header titles/tags
and other tags and paragraphs.
- However, as soon as we switch to Visual Editing mode, and update the
article, all the line spaces / "custom formatting" will be lost! Now, I
need to switch on occasion to Visual, but I like to mostly work in Text
mode, because of full control and freedom.
The HTML output produced in Code/Text modes does not actually change, so
this annoying thing is not even justified by WYSIWYG standard e.g. it does
not affect the end result. But it makes our lives miserable with the
editor's mind of its own.
To be honest, I'd like to have a simple editor, much like this one we have
here on Track during posting issues. It presents us with a plain textarea
input and commands on top, and that's it! It works.
Please see attached video for illustration.
Thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52308>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list