I was recently looking at the history of GML, developed around 1970, and this is the example given:
:h1.Chapter 1: Introduction :p.GML supported hierarchical containers, such as :ol. :li.Ordered lists (like this one), :li.Unordered lists, and :li.Definition lists :eol. as well as simple structures. :p.Markup minimization (later generalized and formalized in SGML), allowed the end-tags to be omitted for the "h1" and "p" elements.
This example shows that GML supported mixed inline and block content (e.g. lists) in paragraphs, as do its successors HTML and various XML standards such as JATS.
It’s a recurring problem that ProseMirror doesn’t support mixed inline and block content, as we’d like to use ProseMirror to edit content that does have mixed inline and block content, so I’d like to find a solution.
The most obvious workaround is to create a new node type (e.g.
fragment) that has
inline* as it’s content and can be used in place of
inline* in other block node types. This would mean wrapping contiguous inline nodes in
fragment blocks on import and unwrapping them on export.
That’s a bit of a hassle and it means adjusting various things in lots of other places, like making keypress handlers work inside
fragment as if it was a paragraph.
Is this the only solution and should we work towards making this possible?
If not, it would be useful to see a full description of the reason for the current restriction on mixed inline and block content in ProseMirror, in case there’s another solution that could be implemented in ProseMirror’s internals which would make this workaround unnecessary.