Closed segevfiner closed 2 years ago
Do you mean dropped when parsing with a markdown parser? Or something else?
Dropped by prosemirror due to having a schema with block+
for table headers, cells. I customized it so it is now inline+
so that it works, but I was wondering whether it's legal to have block stuff inside tables and if/how I should support it.
Yes, that's legal, but I still don't understand which process is dropping these.
The prosemirror schema validation as far as I can tell. Because I'm trying to integrate prosemirror-markdown with an external prosemirror schema.
How are you transforming stuff into a ProseMirror document where this happens?
Using MarkdownParser
from this package, with a slightly modified config from the default, but otherwise very similar.
I see. It looks like MarkdownParser
doesn't really support this, but I'm also wondering how you can have multiple blocks in your markdown tables if the Markdown parser doesn't parse its content as such (omitting block tokens there suggests no block are being parsed)?
That's what I'm not sure about, if you can have blocks inside a Markdown table or not... Because the schema I tried to adapt MarkdownParser
specifies them as containing blocks while the schema here as inlines.
Are these GFM-style tables? I don't believe those support block markup in the cells.
Yeah GFM tables like in the default preset of markdown-it. If those don't support these, then my question is answered, and I just need to adjust the schema to accommodate as I did.
markdown-it doesn't output a
paragraph_{open,close}
token around a table cell's contents which causes it to be dropped with just:As there is only an
inline
inside theth
andtd
but the schema I have specifiesblock+
for them, which means it should have a paragraph... Or is that invalid in Markdown and I should reconfigure the schema?