when writing the schema spec, one has to decide between either returning a dom node or a DOMOutputSpec. When returning a DOMOutputSpec, one can specify the place where children of the node will be placed (the “contentDOM”) with a
I am in a situation where I already have a dom node that should become part of what is returned with toDOM, but I also need to place children inside of the node:
<table> <caption>The <i>caption</i></caption> <!-- The <caption>-node is preexisting --> <tbody><!-- Children go here --></tbody> </table>
I wonder if there is a way to specify the contentDOM (
0) when returning a dom node like this? If I were to return a DOMOutputSpec instead, I would have to translate the preexisting
<caption>-node into a DOMOutputSpec somehow.