diff options
author | ab <abdullah_ahmed@brown.edu> | 2019-06-07 16:37:10 -0400 |
---|---|---|
committer | ab <abdullah_ahmed@brown.edu> | 2019-06-07 16:37:10 -0400 |
commit | ef24cc445aa466cae3b6c40029f7d7bc9baa81b7 (patch) | |
tree | 5d0f1362804eb2b5a8bafe6fee5e060df3536ae8 /src/client/util/ProsemirrorKeymap.ts | |
parent | 08134c962bab2cd62507415f1a67cd921069d8e3 (diff) |
frustrated!
Diffstat (limited to 'src/client/util/ProsemirrorKeymap.ts')
-rw-r--r-- | src/client/util/ProsemirrorKeymap.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/client/util/ProsemirrorKeymap.ts b/src/client/util/ProsemirrorKeymap.ts index 89d01486e..cf656dc17 100644 --- a/src/client/util/ProsemirrorKeymap.ts +++ b/src/client/util/ProsemirrorKeymap.ts @@ -24,22 +24,6 @@ export default function buildKeymap<S extends Schema<any>>(schema: S, mapKeys?: keys[key] = cmd; } - function insertStar(state: EditorState<S>, dispatch: ((tr: Transaction<S>) => void)) { - console.log("creating star..."); - let type = schema.nodes.star as NodeType<S>; - let { $from } = state.selection; - if (!$from.parent.canReplaceWith($from.index(), $from.index(), type)) { - return false; - } - if (dispatch) { - dispatch(state.tr.replaceSelectionWith(type.create())); - } - return true; - } - - console.log("star? hullo"); - bind("Mod-space", insertStar); - bind("Mod-z", undo); bind("Shift-Mod-z", redo); bind("Backspace", undoInputRule); @@ -95,7 +79,6 @@ export default function buildKeymap<S extends Schema<any>>(schema: S, mapKeys?: } if (type = schema.nodes.paragraph) { bind("Shift-Ctrl-0", setBlockType(type)); - bind("Mod-space", insertStar); } if (type = schema.nodes.code_block) { bind("Shift-Ctrl-\\", setBlockType(type)); |