diff --git a/packages/core/src/commands/toggle-mark-with-attrs.ts b/packages/core/src/commands/toggle-mark-with-attrs.ts index 577a8447..a816d183 100644 --- a/packages/core/src/commands/toggle-mark-with-attrs.ts +++ b/packages/core/src/commands/toggle-mark-with-attrs.ts @@ -52,7 +52,7 @@ export const toggleMarkWithAttrs = ( if (missing) { return false; } - console.log(node); + missing = !( markType.isInSet(node.marks) && @@ -74,7 +74,6 @@ export const toggleMarkWithAttrs = ( ); return undefined; }); - console.log(missing); return !missing; }); } diff --git a/packages/core/src/plugins/keymap.ts b/packages/core/src/plugins/keymap.ts index ed8dfaca..e61f73e7 100644 --- a/packages/core/src/plugins/keymap.ts +++ b/packages/core/src/plugins/keymap.ts @@ -1,6 +1,7 @@ import { keymap } from 'prosemirror-keymap'; import { baseKeymap } from 'prosemirror-commands'; import { Plugin } from 'prosemirror-state'; +import { clearMarks } from '../commands'; export const edimBasicKeymapPlugins = (): Plugin[] => { return [ @@ -55,6 +56,10 @@ export const edimBasicKeymapPlugins = (): Plugin[] => { return true; }, + 'Mod-\\': (state, dispatch) => { + clearMarks()(state, dispatch); + return true; + }, }), keymap(baseKeymap), ];