I have a recursive schema consisting in the following hierarchy:
doc
paragraph
span
text
smartfield
span
paragraph
Where:
Block nodes
paragraph {
content: 'span+',
group: 'block'
}
span {
content: 'inline*'
}
And:
Inline nodes
smartfield {
group: 'inline',
content: '(span | paragraph)+',
inline: true,
selectable: true,
atom: true,
draggable: true,
}
Smartfield has specified a nodeview, that looks like this:
{
dom, // <div style="display: inline">
contentDOM: dom
selectNode() {
// not triggered
},
deselectNode() {
// not triggered
}
}
Producing the following html render
<div class="paragraph">
<div class="span">
inline text
<div class="smartfield" style="display: inline">
<div class="span">smartfield</div>
</div>
</div>
</div>
This structure seems to work fine, apart from node selection, whenever I click on the smartfield node the selectNode never triggers. However, if I disable contentDOM and render the children myself, it seems the selection node API works as expected. What could I be missing?