I have several schemas as follows:
ExampleNode
{
group: "block",
content: "card",
toDOM: () => ['example,0],
parseDOM: [{tag:'example}]
}
Card
{
content: "row*",
group: "block",
toDOM: () => ['div',{class:'v-card v-sheet theme--light'},0],
parseDOM: [{tag:'div.v-card v-sheet theme--light'}]
}
Row
{
content: "col+",
group: "frame",
toDOM: () => ['div', {class:"row"},0],
parseDOM: [{tag:'div.row'}]
}
Col
{
content: "block",
group:"frame",
toDOM: () => ['div', {class:"col"},0],
parseDOM: [{tag:"div.col"}]
}
Essentially an ExampleNode > Card > Rows > Col > Block (such as a heading). And I want to render default content in a nodeView that has a DOM of this:
<div class="v-card v-sheet theme--light" contenteditable="false">
<div class="row">
<div class="col">
<h1>
<span style="color: blue;">
Test
</span>
</h1>
</div>
<div class="col">
<h1>
<span style="color: blue;">
Test
</span>
</h1>
</div>
</div>
</div>
I can get the ExampleNode to have the card content, but I can’t get the card content to inherit the rows and for the rows to inherit the cols and for the cols to represent the h1 and its content