mobiledoc-kit icon indicating copy to clipboard operation
mobiledoc-kit copied to clipboard

Ability to insert line breaks within paragraphs

Open erwan opened this issue 10 years ago • 3 comments

Currently pressing enter creates a new paragraph, which is good.

It would be nice to be able to create line breaks within paragraphs (typically br tags) by pressing Alt+Enter or Shift+Enter.

I think it could go simply as a \n in the mobiledoc, and then be converted to a br in the html renderer.

erwan avatar Dec 03 '15 10:12 erwan

Thanks for the suggestion. I agree, this would be a nice improvement. There may be some challenges related to cursor-positioning in the editor (I expect a <br> element in DOM will be necessary to make the visual line break), but I would not think they would be too bad.

bantic avatar Dec 07 '15 23:12 bantic

For posterity: this was pretty easy to accomplish with a value-less atom and a hot-key. We felt that solution was in keeping with Mobiledoc's philosophy of not tackling presentational concerns.

joshfrench avatar Jul 07 '16 19:07 joshfrench

Is there any update on this one? I would disagree about a line break being a "presentational concern", as it works by separating two separate thoughts more than a semicolon or a dash would, but less than a paragraph. For me, it is a pretty important part of the content editing.

apfelbox avatar Nov 26 '18 15:11 apfelbox