|
|
@@ -75,7 +75,7 @@ export function insert( position, nodes ) {
|
|
|
_mergeNodesAtIndex( parent, index + normalizedNodes.length );
|
|
|
_mergeNodesAtIndex( parent, index );
|
|
|
|
|
|
- // If given element is a DocumentFragment and is set to the Document then we need to transfer its Markers.
|
|
|
+ // If given element is a DocumentFragment and is being inserted to the Document then we need to transfer its Markers.
|
|
|
if ( nodes instanceof DocumentFragment && position.root.document.markers instanceof MarkerCollection ) {
|
|
|
for ( const marker of nodes.markers ) {
|
|
|
const range = new Range( new Position( parent, marker[ 1 ].start.path ), new Position( parent, marker[ 1 ].end.path ) );
|