diff options
author | bob <bcz@cs.brown.edu> | 2019-09-10 13:38:16 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-09-10 13:38:16 -0400 |
commit | 5ea7e3318620865146318e0f3826b6f13aec0675 (patch) | |
tree | 41eff7ce8a405c70b5d48861c3e19658a7adec7f /src/client/util/ProsemirrorExampleTransfer.ts | |
parent | 149fa3116cdbb58f2eed144cc0bb90c1b1cd2b2a (diff) |
added more support for creating stylized layouts
Diffstat (limited to 'src/client/util/ProsemirrorExampleTransfer.ts')
-rw-r--r-- | src/client/util/ProsemirrorExampleTransfer.ts | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/client/util/ProsemirrorExampleTransfer.ts b/src/client/util/ProsemirrorExampleTransfer.ts index bac0177ad..1d2d33800 100644 --- a/src/client/util/ProsemirrorExampleTransfer.ts +++ b/src/client/util/ProsemirrorExampleTransfer.ts @@ -14,7 +14,6 @@ export type KeyMap = { [key: string]: any }; export default function buildKeymap<S extends Schema<any>>(schema: S, mapKeys?: KeyMap): KeyMap { let keys: { [key: string]: any } = {}, type; - keys["ACTIVE"] = false; function bind(key: string, cmd: any) { if (mapKeys) { let mapped = mapKeys[key]; @@ -148,10 +147,6 @@ export default function buildKeymap<S extends Schema<any>>(schema: S, mapKeys?: return tx; } bind("Enter", (state: EditorState<S>, dispatch: (tx: Transaction<S>) => void) => { - if (!keys["ACTIVE"]) {// hack to ignore an initial carriage return when creating a textbox from the action menu - dispatch(state.tr.setSelection(TextSelection.create(state.doc, state.selection.from - 1, state.selection.from)).deleteSelection()); - return true; - } var marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks()); if (!splitListItem(schema.nodes.list_item)(state, (tx3: Transaction) => dispatch(tx3))) { if (!splitBlockKeepMarks(state, (tx3: Transaction) => { |