Skip to content
Snippets Groups Projects
Commit 63d03478 authored by chris's avatar chris
Browse files

update comments

parent 8d5702ee
No related branches found
No related tags found
1 merge request!552Publish new comments
......@@ -55,7 +55,7 @@ const Editoria = () => {
autoFocus
placeholder="Type Something..."
fileUpload={file => renderImage(file)}
value={demo}
// value={demo}
// readonly
layout={layout}
// onChange={debounce(source => {
......
......@@ -225,7 +225,7 @@ export default {
'HighlightToolGroup',
'TransformToolGroup',
'CustomTagInline',
'Notes',
// 'Notes',
'Lists',
'Images',
'SpecialCharacters',
......@@ -303,12 +303,12 @@ export default {
],
updateTags: saveTags,
},
// YjsService: {
// // eslint-disable-next-line no-restricted-globals
// connectionUrl: 'ws://localhost:4000',
// docIdentifier: 'prosemirror-demo',
// YjsType: 'prosemirror',
// },
YjsService: {
// eslint-disable-next-line no-restricted-globals
connectionUrl: 'ws://localhost:4000',
docIdentifier: 'prosemirror-demo',
YjsType: 'prosemirror',
},
AskAiContentService: {
AskAiContentTransformation: DummyPromise,
......@@ -316,7 +316,7 @@ export default {
},
services: [
// new YjsService(),
new YjsService(),
new BlockDropDownToolGroupService(),
new AskAiContentService(),
new CustomTagService(),
......@@ -330,7 +330,7 @@ export default {
new ImageService(),
new TablesService(),
new BaseService(),
new NoteService(),
// new NoteService(),
new CodeBlockService(),
new EditingSuggestingService(),
new DisplayTextToolGroupService(),
......
......@@ -19,6 +19,9 @@ export const CommentDecorationPlugin = (name, options) => {
});
},
apply(transaction, pluginState, oldState, newState) {
console.log(transaction);
const yjsSync = transaction.getMeta('y-sync$');
if (yjsSync) console.log('hodododo');
return pluginState.apply(transaction, newState);
},
},
......@@ -36,9 +39,10 @@ export const CommentDecorationPlugin = (name, options) => {
// options.onSelectionChange(annotations);
options.onSelectionChange(this.getState(state).allCommentsList());
this.getState(state).createDecorations(state);
}
contentSize = state.doc.content.size;
allCommentsCount = this.getState(state).allCommentsList().length;
// contentSize = state.doc.content.size;
// allCommentsCount = this.getState(state).allCommentsList().length;
return decorations;
},
},
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment