Page MenuHomePhabricator

VisualEditor: When applying the <pre> formatting to multiple paragraphs, make them instead a single <pre> with newlines between the paragraphs
Open, MediumPublicFeature


I was wondering if we could have a feature whereby multiline selected text could be enveloped in one <pre> or <code> when the corresponding heading level or text formatting option is clicked from the toolbar.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:46 AM
bzimport set Reference to bz72706.

(If I select multiple lines, I'm able to wrap them in code tags using the corresponding option in the toolbar. How is this different from your request?)

Suppose one visits an article using Google Chrome for Mac OS. After selecting two consecutive paragraphs in the "Viewing Profile Info" section, then choosing either "Preformatted" from the heading level dropdown, or "{ } Computer code" from the text formatting popover "pane", two <code> or two <pre> sections are created, not one. Furthermore, if one starts a new stanza with "Preformatted" or "{ } Computer code" heading level / formatting, upon pressing the Enter key (as well as Command+Enter for the typical non-terminating line break in Mac OS or Shift+Enter), the editing context switches out of <pre> or <code> mode.

Ignore the "Viewing Profile Info" part. It could be any section :)

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:23 PM
Aklapper removed subscribers: rmoen, TrevorParscal.