I define such NodeSpec
value: {
content: 'text*',
isolating: true,
attrs: {type: {default: "text"}},
parseDOM: [{tag: 'span[type]', getAttrs: node => {
console.log('parse', node)
return {type: node.getAttribute('type')}
}}],
toDOM: node => ["span", node.attrs, 0]
}
I use it to parse the initial document content
<span type="time">18:00</span>
<span type="place">xxx</span>
It results into two value
nodes.
Now I select them all, and delete them, and then paste them back.
They join together into one value
.
But I’d like to keep them as they are. How could I do it?