diff --git a/wax-prosemirror-services/src/TrackChangeService/track-changes/helpers/markInsertion.js b/wax-prosemirror-services/src/TrackChangeService/track-changes/helpers/markInsertion.js index c8c6d547cc1cb597b96beb43aba9c678aef98483..d9c6d841428a7e2cbb028dd083daf2cc0a15e7b1 100644 --- a/wax-prosemirror-services/src/TrackChangeService/track-changes/helpers/markInsertion.js +++ b/wax-prosemirror-services/src/TrackChangeService/track-changes/helpers/markInsertion.js @@ -1,3 +1,5 @@ +import { v4 as uuidv4 } from "uuid"; + const markInsertion = (tr, from, to, user, date, group) => { tr.removeMark(from, to, tr.doc.type.schema.marks.deletion); tr.removeMark(from, to, tr.doc.type.schema.marks.insertion); @@ -36,7 +38,7 @@ const markInsertion = (tr, from, to, user, date, group) => { tr.setNodeMarkup( pos, null, - Object.assign({}, node.attrs, { track, group }), + Object.assign({}, node.attrs, { track, group, id: uuidv4() }), node.marks ); }