From 3730046d6bb11a2670d8239d5433645293becfa0 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Tue, 23 Apr 2024 14:27:53 +0300 Subject: [PATCH] console.log active --- .../src/CommentsService/plugins/CommentPlugin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wax-prosemirror-services/src/CommentsService/plugins/CommentPlugin.js b/wax-prosemirror-services/src/CommentsService/plugins/CommentPlugin.js index a685d96d4..561378091 100644 --- a/wax-prosemirror-services/src/CommentsService/plugins/CommentPlugin.js +++ b/wax-prosemirror-services/src/CommentsService/plugins/CommentPlugin.js @@ -23,11 +23,13 @@ const getComment = (state, context) => { (state.selection.from === state.selection.to && last(commentData).data.conversation.length !== 0) ) { - console.log(last(commentData)); + console.log('return active', last(commentData)); return last(commentData); } + console.log('not return active'); return undefined; } + console.log('not return active 2'); return undefined; }; @@ -40,6 +42,7 @@ export default (key, context) => { }, apply(tr, prev, _, newState) { const comment = getComment(newState, context); + console.log('active comment', comment); let createDecoration; if (comment) { createDecoration = DecorationSet.create(newState.doc, [ -- GitLab