Newer
Older
import CommentBubbleComponent from './components/ui/comments/CommentBubbleComponent';
import RightArea from './components/RightArea';
// import CopyPasteCommentPlugin from './plugins/CopyPasteCommentPlugin';
import { CommentDecorationPlugin } from './plugins/CommentDecorationPlugin';
// this.app.PmPlugins.add(
// 'copyPasteCommentPlugin',
// CopyPasteCommentPlugin('copyPasteCommentPlugin', this.app.context),
// );
const commentsConfig = this.app.config.get('config.CommentsService');
this.app.PmPlugins.add(
'commentPlugin',
CommentPlugin('commentPlugin', this.app.context),
);
existingComments: () => {
const map = new Map();
if (commentsConfig.setComments().length > 0) {
commentsConfig.setComments().forEach(value => {
map.set(value.id, value);
});
}
return map;
},
this.allCommentsFromStates = this.allCommentsFromStates.filter(
comm =>
(items.find(item => item.id === comm.id) || {}).id !== comm.id,
);
this.allCommentsFromStates = this.allCommentsFromStates.concat([
...items,
]);
commentsConfig.getComments(this.allCommentsFromStates);
this.app.context.setOption({ comments: this.allCommentsFromStates });
'CommentDecorationPlugin',
CommentDecorationPlugin('commentDecorationPlugin', options),
const createOverlay = this.container.get('CreateOverlay');
const layout = this.container.get('Layout');
const commentConfig = this.config.get('config.CommentsService');
comment: commentMark(commentConfig?.showTitle || false),