web-components: Support Hardbreaks in Markdown

Feature Request 🛍️

Hardbreaks are handled in the commonmark spec, and should be supported in the editor

Use Case

A user would expect the editor to respect their wishes to maintain extra spaces

Possible Solution

A toolbar button or hotkey shortcut?

Context

This should persist: image

Via a something.md file which looks like:

Foo\
\
\
bar

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 31 (26 by maintainers)

Most upvoted comments

To reiterate the point I finished on in the call:

This is new tech, and we should not hamstring it by trying to force it to fit the model of the past (Word, Docs, XML, PDF). There won’t be a way out of having a learning curve, but we just need to minimize the curve with thoughtful assistance.

I think updating to markdown for the benefit of consistency and ability to machine-read becomes more useless the more we try to force it into taking the same shape as pre-markdown.

  1. Would the notion of markdown hard line break be sufficient to capture the use case you describe in your second paragraph?

@jeromesimeon Yes - something involving a backslash (\) or double-space at the end of a line ( ) is all that would be needed.

@jeromesimeon this reminds me of how a lot of apps seem to be moving towards supporting / for commands to cut down on toolbar real estate and improve a11y (Slab has grayed text on new lines “Type / for Commands”, Slack supports this as a command, Notion…). This is not a Word or GDocs standard. Perhaps this can act as inspiration for solving this.

That’s interesting. I can’t say I 100% follow your idea, but it makes me think of inline-replacement / escape sequences. e.g., in Slack you write - something and it automatically turns it into a rich-text bullet. Is that the kind of thing you’re thinking about?

Might be a bit more ambitious than simply solving the specific issue of line breaks but that could be an interesting direction.

For reference

MarkdownNewLines