From b9240de87b9934b88d9a9433fa1c4b0856dfa572 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Tue, 23 Apr 2024 13:29:09 +0300 Subject: [PATCH] cleanup CommentState --- editors/demo/src/Editoria/config/config.js | 3 ++- .../src/CommentsService/plugins/CommentState.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/editors/demo/src/Editoria/config/config.js b/editors/demo/src/Editoria/config/config.js index 4e0e6c816..fc07b8b58 100644 --- a/editors/demo/src/Editoria/config/config.js +++ b/editors/demo/src/Editoria/config/config.js @@ -45,6 +45,7 @@ import CharactersList from './CharactersList'; // const updateTitle = title => { // console.log(title); // }; +console.log('in config'); async function DummyPromise(userInput) { return new Promise((resolve, reject) => { @@ -289,7 +290,7 @@ export default { ImageService: { showAlt: true }, CommentsService: { - showTitle: false, + showTitle: true, getComments, setComments, }, diff --git a/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js b/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js index b685c0c8e..abe075814 100644 --- a/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js +++ b/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js @@ -211,7 +211,7 @@ export default class CommentState { return this; // eslint-disable-next-line no-else-return } else { - this.options.map.forEach((annotation, _) => { + map.forEach((annotation, _) => { if ('from' in annotation && 'to' in annotation) { annotation.from = transaction.mapping.map(annotation.from); annotation.to = transaction.mapping.map(annotation.to); -- GitLab