diff --git a/editors/demo/src/Editoria/config/configMobile.js b/editors/demo/src/Editoria/config/configMobile.js index 0931106d570e814040a9d40c1429ce6504419a68..64ff3e489af4c88cddfcf62c5811ce434b150b20 100644 --- a/editors/demo/src/Editoria/config/configMobile.js +++ b/editors/demo/src/Editoria/config/configMobile.js @@ -36,7 +36,6 @@ import { CustomTagService, } from 'wax-prosemirror-services'; -import { WaxSelectionPlugin } from 'wax-prosemirror-plugins'; import { DefaultSchema } from 'wax-prosemirror-utilities'; import invisibles, { @@ -81,12 +80,7 @@ export default { TitleService: { updateTitle }, EnableTrackChangeService: { enabled: false }, - PmPlugins: [ - columnResizing(), - tableEditing(), - invisibles([hardBreak()]), - WaxSelectionPlugin, - ], + PmPlugins: [columnResizing(), tableEditing(), invisibles([hardBreak()])], CustomTagService: { tags: [ { label: 'custom-tag-label-1', tagType: 'inline' }, diff --git a/wax-prosemirror-plugins/index.js b/wax-prosemirror-plugins/index.js index 431000b44c6b2e7eae3a322bb6a4feb280e178bc..61ff650c0465308b0fabc0412a5272c4a3a9cc3c 100644 --- a/wax-prosemirror-plugins/index.js +++ b/wax-prosemirror-plugins/index.js @@ -4,7 +4,6 @@ export { default as HideShowPlugin } from './src/trackChanges/HideShowPlugin'; export { default as CommentPlugin } from './src/comments/CommentPlugin'; export { default as CopyPasteCommentPlugin } from './src/comments/CopyPasteCommentPlugin'; -export { default as WaxSelectionPlugin } from './src/WaxSelectionPlugin'; export { default as highlightPlugin } from './src/highlightPlugin'; export { default as mathPlugin } from './src/math/math-plugin'; diff --git a/wax-prosemirror-plugins/src/WaxSelectionPlugin.js b/wax-prosemirror-plugins/src/WaxSelectionPlugin.js deleted file mode 100644 index ef1663091b2a0d9b1a7ef567bd8a5eb1fca3bced..0000000000000000000000000000000000000000 --- a/wax-prosemirror-plugins/src/WaxSelectionPlugin.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Decoration, DecorationSet } from 'prosemirror-view'; -import { Plugin, PluginKey } from 'prosemirror-state'; - -const waxSelectionPlugin = new PluginKey('waxSelectionPlugin'); - -const WaxSelectionPlugin = new Plugin({ - key: waxSelectionPlugin, - state: { - init(config, instance) { - return { deco: DecorationSet.empty }; - }, - apply(tr, prev, previousState, newState) { - const { selection } = tr; - const createDecoration = DecorationSet.create(newState.doc, [ - Decoration.inline(selection.$from.pos, selection.$to.pos, { - class: 'wax-selection-marker', - }), - ]); - return { createDecoration }; - }, - }, - props: { - decorations(state) { - const waxSelectionPluginState = - state && waxSelectionPlugin.getState(state); - return waxSelectionPluginState.createDecoration; - }, - }, -}); - -export default WaxSelectionPlugin;