Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
winetree94 committed Dec 21, 2023
1 parent 06d1289 commit a3d7c3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/commands/toggle-mark-with-attrs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const toggleMarkWithAttrs = (
if (missing) {
return false;
}
console.log(node);

missing =
!(
markType.isInSet(node.marks) &&
Expand All @@ -74,7 +74,6 @@ export const toggleMarkWithAttrs = (
);
return undefined;
});
console.log(missing);
return !missing;
});
}
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/plugins/keymap.ts
Original file line number Diff line number Diff line change
@@ -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 [
Expand Down Expand Up @@ -55,6 +56,10 @@ export const edimBasicKeymapPlugins = (): Plugin[] => {

return true;
},
'Mod-\\': (state, dispatch) => {
clearMarks()(state, dispatch);
return true;
},
}),
keymap(baseKeymap),
];
Expand Down

0 comments on commit a3d7c3a

Please sign in to comment.