Forum Archive

line breaks vs paragraph breaks in html preview

robopu

in ulysses, the md editor allows you to enter line breaks (which get converted to
tags in html output) and paragraph breaks (newlines??? which are converted to

tags in html output).

if i take the md text i create in ulysses and import it into editorial via dropbox, the editorial editor recognizes both line and new lines correctly as in ulsysses. BUT if i try to html preview it in editorial, the line breaks are not recognized as
tags in the html output and the text wraps where i don't want it to.

is there any way i can change this behavior?

also is there a way to display the line break / return characters in the editorial editor?

the ability to have the linebreaks automatically recognized as br tags in html is very important to me. my use case is i often take one line or sentence in a foreign language (set in bold) and then have the translated version right beneath it (set in normal text). ie. the two lines stay together as a unit. this makes it easy to both type up and read in the editor itself (vs entering pre / code or spans etc which slow down the process and clutter the pure text in the edtior) and also a joy to read the same way if exported to html.

as it is right now, the html output in editorial wraps which just makes it all look a jumbled mess without perhaps having to edit the md text as html instead of pure md

PS: i'm not sure if i'm using the terms for linebreak and newline correctly above but i think it's clear what i mean.

thanks

dgelessus

I don't have Ulysses, so I can't test there. But the regular Markdown syntax for paragraph and line breaks works for me in Editorial.

For a paragraph break (i. e. a new <p>...</p> in HTML), you need at least two newlines (at least one blank line in between paragraphs). For a line break without starting a new paragraph (i. e. a <br/> in HTML), you need to type at least two spaces and then a single line break. If you don't add the two spaces before the line break, it is ignored and replaced with a space.

Also, the HTML preview automatically wraps most text so it fits on the screen without horizontal scrolling. That isn't specific to Editorial though - HTML text soft wraps by default unless you disable it using CSS.