Page MenuHomeMiraheze

how can I enter line breaks within paragraph? Goal: distinguish between line and paragraph breaks in ordinary text?
Open, NormalPublic

Description

from previous and related task https://phabricator.miraheze.org/T5734:

Try setting the css to .mw-body p {margin-bottom: 1em;}

ok thanks, this is working for me.

The bad news is, this clarifies the situation, for my next question, or really the larger question/issue, which is: how can I put line breaks into a 'paragraph'?

Or to more precisely express the goal: what I want is for the editor to allow me to visually and semantically express, distinctly, line breaks and paragraph breaks. Afaik this is typical across visual editors except perhaps HTML editors.

As an example, of what for us is a common case: in the wiki's Village Buildings collection's bibliography https://housing.wiki/wiki/Village_Buildings_bibliography, the first item in bibliography has a line which I want visually and semantically to be part of the item, not in a new paragraph, and not on the same line as the preceding info:

1 Goldman School of Public Policy, University of California, Berkeley.

There are other related cases such as wanting text on a new line within a bullet point or list item, without turning it into a new bullet/item.

I have been attempting to deal with these issues by adding an extra blank line between paragraphs, which I discovered can usually be done by adding a line break, then a space character, then another line break. However, this is a kludge, doesn't seem to work quite consistently, doesn't work within bullet / numbered lists, and is using visual styling for semantic distinction in a way I imagine sooner or later will cause problems and hamper long-term maintainability and presentation of the wiki materials.

So now I'm looking again at what I realize is a clearer statement of the problem/question: (how) can I visually and semantically distinguish between line breaks and paragraph breaks?

tbh I feel kind of embarrassed to be asking this, because it seems like quite basic point for any editor tool. I've spent a fair time looking into it, and am aware that:

  1. MediaWiki basic (wikitext) editor removes single line breaks, though there is a long-running controvery within WikiMedia / Wikipedia community over this behavior https://en.wikipedia.org/wiki/Wikipedia:Line_breaks_usage. In the context of Wikitext editor, there is a relatively practical solution, that a line break can be manually inserted with a <br /> tag. Also, from a wiki reader's standpoint, it doesn't really matter because if article editors use this manual linebreak plus paragraph breaks, the rendered text looks as as expected.
  1. There is a several-years-old thread https://phabricator.wikimedia.org/T184755 discussing the issue in context of VisualEditor, where a user can't readily and presumably doesn't want to manually enter markup text like a <br /> tag. The task is marked Closed/Resolved but I don't really follow why as I don't see how the request/issue got answered.

I'm struggling to wrap my head around all this, because it seems
a) the need for distinguishing between line breaks and paragraph breaks is obvious, as all kinds of text traditionally and semantically includes line breaks, beyond special cases MediaWiki recognizes like preformatted blocks (e.g.) code or <poem> extension; and
b) VisualEditor / Parsoid, might, as far as I can see, use same approach as Wikitext and put in a <br /> when a user wants a line break, e.g. by user entering <shift>+<return> i.e. soft break, the convention across all contemporary visual text editors that I know of.

It's a bit embarrassing because either:
a) I'm missing something relatively obvious about how to get the (I think typical) behavior I want, or
b) VisualEditor project isn't yet providing a ready, or any, way around this, and so the editor behavior is at odds, and kind of opaquely/bafflingly at odds, with how visual text editors prevailingly work and users expect them to work. Unlike with most including the most basic editors, VisualEditor collapses multiple consecutive line breaks, so this blocks the way user might usually and intuitively achieve the purpose.
[note the use of line breaks in laying out this question..].

Anyway, sorry for verbose explanation, do you have any ideas on how to achieve the desired VisualEditor behavior as described?
thanks, Tim.

Event Timeline

So, any thoughts on this problem? Can you think of any possible way to get VisualEditor on MediaWiki (hosted at Miraheze) to support line breaks, so it could appropriately handle & present text other than continuous prose paragraphs?

There's one thing to consider, though, VisualEditor is a (semi) Rich Text Editor, not a WYSIWYG editor, at least for now. So, as far as I understood, in this case, there's no real need for VE distinguish between line breaks and breaks inside paragraphs.
The only thing I can think as a "solution" for this is just switching to the WikiText editor and inserting the breaks you want (and you don't need the slash after the br anymore).