From 321cddbd25ca0c22b0fcc3a84c476ca9e7925430 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Sat, 11 Jul 2020 00:49:39 +0300 Subject: [PATCH] fix --- editors/editoria/src/Editoria.js | 2 +- wax-prosemirror-core/src/WaxView.js | 4 ++-- wax-prosemirror-services/src/NoteService/Editor.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editors/editoria/src/Editoria.js b/editors/editoria/src/Editoria.js index e2cd4aede..5d6139312 100644 --- a/editors/editoria/src/Editoria.js +++ b/editors/editoria/src/Editoria.js @@ -50,7 +50,7 @@ const Editoria = () => ( value={`<p class="paragraph">This is the first paragraph</p><p class="paragraph">This is the <span class="comment" data-id="ff7552b8-956c-4822-99b5-826715751c45" data-conversation="[{"demo":"dsdadsa"}]" data-group="main">second</span> paragraph</p><p class="author">This is an author</p>`} // value={`<p class="paragraph"><span class="comment" data-id="834ba3c5-1fcf-4a42-8e2f-1f975f229716" data-conversation="[]" data-group="main">and a </span><span class="insertion" data-id="" data-user="1234" data-username="demo" data-date="26541557" data-group=""><span class="comment" data-id="834ba3c5-1fcf-4a42-8e2f-1f975f229716" data-conversation="[]" data-group="main">sdasdssd</span></span><span class="comment" data-id="834ba3c5-1fcf-4a42-8e2f-1f975f229716" data-conversation="[]" data-group="main">paragraph</span></p><p class="paragraph">more</p>`} layout={EditoriaLayout} - TrackChange + // TrackChange // onChange={source => console.log(source)} user={user} /> diff --git a/wax-prosemirror-core/src/WaxView.js b/wax-prosemirror-core/src/WaxView.js index 7745a2c6f..924116c7d 100644 --- a/wax-prosemirror-core/src/WaxView.js +++ b/wax-prosemirror-core/src/WaxView.js @@ -71,8 +71,8 @@ export default props => { "main" ); } - - const tr = { props: { TrackChange } } + const { TrackChange } = props; + const tr = TrackChange ? trackedTransaction(transaction, view.state, user) : transaction; diff --git a/wax-prosemirror-services/src/NoteService/Editor.js b/wax-prosemirror-services/src/NoteService/Editor.js index 2d3e48f53..87d36a662 100644 --- a/wax-prosemirror-services/src/NoteService/Editor.js +++ b/wax-prosemirror-services/src/NoteService/Editor.js @@ -52,7 +52,7 @@ export default ({ node, view }) => { for (let j = 0; j < steps.length; j++) outerTr.step(steps[j].map(offsetMap)); } - // + if (outerTr.docChanged) view.dispatch(outerTr.setMeta("outsideView", "notes")); } -- GitLab