[wp-trac] [WordPress Trac] #39574: Editor patterns: add empty headings/quotes
WordPress Trac
noreply at wordpress.org
Fri Jan 13 14:49:17 UTC 2017
#39574: Editor patterns: add empty headings/quotes
--------------------------+-----------------------------
Reporter: mahu2401 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Currently some patterns normally only work if there's other text after the
leading character(s). I you type `## Test` and press enter, a new h2
element will be created. If you type `##` followed by zero or more spaces,
no heading is added and the `##` stays "normal" text. I think this is and
should be the intended behaviour, so no empty elements are created.
But if yout enter `## Test`, then move the cursor between `##` and Test
followed by pressing enter, an empty heading will be created and the
resulting html looks like this:
{{{
<h2></h2>
Test
}}}
Until switching to the text editor and back, you are not able to add text
to the heading because it doesn't show up in visual mode.
When doing the same with `>`, it doesn't create an empty blockquote, but
removes the leading char. The visual editor is then adding an additional
line of whitespace, where you can't put your cursor in. This line
disappears also after switching to text mode and back.
I've tested with WP 4.3 and 4.7.1.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39574>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list