Hey,
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 0.
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.
The contents of this node are created through another third party library so that I don’t have direct control over what elements are used, etc…
That could be a work-around. But I was wondering of it’s not possible to specify the contentDOM directly (or for that to be added in the next release). That would save me from having to write my own table plugin and I wouldn’t have to convert all existing content to this new structure.