diff --git a/editors/editoria/src/config/config.js b/editors/editoria/src/config/config.js index 08f4a99e4b4e8693e399a3f67fbd3b011f91e81c..c363d597eb3f6aedd6b36ce5dd7d521bf0947d89 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 71af7e529ce957df1da80b7e1e382146e21b738f..7c894916cfeedacccb1450ddfa2a0bae6cb7a72e 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 0000000000000000000000000000000000000000..70a1e408394d19ab5abc54c3727a8d0290304945 --- /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"); + } + } + }); +};