Opened 8 years ago
Closed 7 years ago
#41298 closed defect (bug) (wontfix)
Text Editor: Extra blank lines added above blockquote-formatted text
Reported by: | zoonini | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.8 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
Extra blank lines are displayed after applying blockquote tags in the Text editor.
To replicate:
- Switch to the Text editor
- Add several paragraphs of text
- Select a paragraph
- Click the "blockquote" formatting button in the toolbar
Result:
Several extra blank lines are added above the blockquote, which then need to be removed.
Expected:
Applying blockquote tags to a paragraph should not add extra blank lines before the quote.
Screencast:
https://cloudup.com/iE2UG9QrnrU
Tested with 4.8, no plugins, Twenty Seventeen.
This issue was already fixed in the international support forums by @SergeyBiryukov in this Meta ticket.
Attachments (1)
Change History (9)
#2
@
7 years ago
Looks like the newlines were added 12 years ago in [2476].
@azaozz: any objections to removing them?
#3
follow-up:
↓ 6
@
7 years ago
I don't have "strong feelings" either for or against removing them. This is more of a visual helper when inserting a blockquote, same as adding tabs before <li>
tags.
It has the advantage that if the user clicks on the button while the caret is in the middle of a paragraph, the paragraph will be properly separated (both visually and in wpautop) and the blockquote will be inserted.
I'm not sure what the advantage of removing them would be. There is no need to remove the extra lines, wpautop will strip them. We can go a step further too: can look for line breaks before and after the insertion point and add them if none. Just not sure if it is worth the trouble :)
#4
follow-up:
↓ 5
@
7 years ago
It has the advantage that if the user clicks on the button while the caret is in the middle of a paragraph, the paragraph will be properly separated (both visually and in wpautop) and the blockquote will be inserted.
This is a good point.
I'm not sure what the advantage of removing them would be. There is no need to remove the extra lines, wpautop will strip them.
As a user I expect the published post to respect the spacing in the editor. It's confusing for me to have blank lines stripped out.
But if I'm the only one who's ever mentioned this over the years, perhaps it's best to leave it as is. ;-)
I only noticed this originally over in the support forums, and the issue has already been fixed there.
#5
in reply to:
↑ 4
@
7 years ago
- Keywords close added
Replying to zoonini:
As a user I expect the published post to respect the spacing in the editor. It's confusing for me to have blank lines stripped out.
Yeah, I understand. But the Text editor has always worked this way. More than two line breaks are always stripped. It's not wysiwyg, one line break is converted to a <br>, two line breaks are converted to a paragrph. The rest is "direct HTML" where line breaks don't matter.
#6
in reply to:
↑ 3
;
follow-up:
↓ 7
@
7 years ago
Replying to azaozz:
I'm not sure what the advantage of removing them would be. There is no need to remove the extra lines, wpautop will strip them.
It was an issue on support forums, where the quoted text generally already has line breaks before and after. When clicking the blockquote button, more line breaks are added, and your reply suddenly jumps down.
That said, the workflow for writing a blog post vs. answering a support question is different, so now that it's fixed for the forums in [meta5661], WordPress core probably doesn't need this change :)
#7
in reply to:
↑ 6
@
7 years ago
Replying to SergeyBiryukov:
Ah, I see. Thinking that too, thanks for the background :)
I have added patch of removing extra line for "blockquote".