From c52053a9a8e4f3dfc3b566754e5cd49de98a7bbe Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Wed, 15 Apr 2020 11:58:47 +0300 Subject: [PATCH] intitial active comment files --- editors/editoria/src/config/config.js | 9 ++++++++- wax-prosemirror-plugins/index.js | 2 ++ .../src/comments/ActiveComment.js | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 wax-prosemirror-plugins/src/comments/ActiveComment.js diff --git a/editors/editoria/src/config/config.js b/editors/editoria/src/config/config.js index 08f4a99e4..c363d597e 100644 --- a/editors/editoria/src/config/config.js +++ b/editors/editoria/src/config/config.js @@ -23,6 +23,8 @@ import { CommentsService } from "wax-prosemirror-services"; +import { ActiveCommnet } from "wax-prosemirror-plugins"; + import invisibles, { space, hardBreak, @@ -54,7 +56,12 @@ export default { RulesService: [emDash, ellipsis], ShortCutsService: {}, - PmPlugins: [columnResizing(), tableEditing(), invisibles([hardBreak()])], + PmPlugins: [ + columnResizing(), + tableEditing(), + invisibles([hardBreak()]), + ActiveCommnet() + ], services: [ new PlaceholderService(), diff --git a/wax-prosemirror-plugins/index.js b/wax-prosemirror-plugins/index.js index 71af7e529..7c894916c 100644 --- a/wax-prosemirror-plugins/index.js +++ b/wax-prosemirror-plugins/index.js @@ -1,3 +1,5 @@ export { default as TrackChangePlugin } from "./src/trackChanges/TrackChangePlugin"; + +export { default as ActiveCommnet } from "./src/comments/ActiveComment"; diff --git a/wax-prosemirror-plugins/src/comments/ActiveComment.js b/wax-prosemirror-plugins/src/comments/ActiveComment.js new file mode 100644 index 000000000..70a1e4083 --- /dev/null +++ b/wax-prosemirror-plugins/src/comments/ActiveComment.js @@ -0,0 +1,15 @@ +import { Plugin, PluginKey } from "prosemirror-state"; +import { Decoration, DecorationSet } from "prosemirror-view"; + +const activeCommnet = new PluginKey("activeCommnet"); + +export default props => { + return new Plugin({ + key: activeCommnet, + props: { + decorations: state => { + console.log("111"); + } + } + }); +}; -- GitLab