Closed theroch closed 1 year ago
Sounds reasonable to support that, even if that is not something that makes the output markdown table very readable.
Any thoughts @max-nextcloud ?
We should support the <br>
syntax as this is the most common one, \
is only supported by pandoc (as far as I know).
Not sure about the <br>
syntax as that feels like a first step to introduce HTML into our markdown set. What do others think? @vinicius73, @max-nextcloud, @juliushaertl, @juliushaertl, @jancborchardt?
My main concern about HTML would be that we properly need to ensure to purify/sanitize it, though I think tiptap/prosemirror might already take care of that quite well.
The security recommendations of markdown-it say:
markdown-it
provides 2 possible strategies to produce safe output:
- Don't enable HTML. Extend markup features with plugins. We think it's the best choice and use it by default.
- That's ok for 99% of user needs.
- Output will be safe without sanitizer.
- Enable HTML and use external sanitizer package.
I'd like to avoid enabling HTML. But I think we could support <br>
without enabling it. It would require us to parse <br>
and <br />
inside a table as a token of it's own and turn it into a <br>
tag when parsing the markdown. I think tiptap would handle that <br>
tag just fine.
We'd also need to serialize <br>
tags in tables to that token in the toMarkdown
function of table cells or so.
Is your feature request related to a problem? Please describe. We want to have line breaks in table rows to format the text. Othe markdown viewers/editors allow this by using
<br>
or<br />
tags.Describe the solution you'd like Support
<br>
tags or other formating tags to allow line breaks in table rows like this:Describe alternatives you've considered We already tested with double spaces,
\
,\n
,nothing works.
Additional context See also https://stackedit.io/app#