Steps to reproduce:
data = [ { type: 'paragraph' }, 'a', 'b', 'c', { type: '/paragraph' } ]; doc = ve.dm.example.createExampleDocumentFromData( data ); tx = new ve.dm.Transaction( [ { type: 'retain', length: 1 }, { type: 'replace', remove: 'a', insert: [ { type: 'inlineImage' }, { type: '/inlineImage' } ] }, { type: 'retain', length: 3 } ] ); doc.commit( tx ); doc.documentNode.children[ 0 ].children.map( node => node.getType() + ':' + node.getLength() )
Expected output:
["inlineImage:0", "text:2"]
Actual output:
["text:0", "inlineImage:0", "text:2"]