Commit 71d85d77 authored by chris's avatar chris

CreateShortCuts move to core

parent e5edb330
...@@ -17,7 +17,7 @@ import { ...@@ -17,7 +17,7 @@ import {
goToNextCell goToNextCell
} from "prosemirror-tables"; } from "prosemirror-tables";
import { Wax, CreateSchema, CreateShortCuts } from "wax-prosemirror-core"; import { Wax, CreateSchema } from "wax-prosemirror-core";
import { EditoriaSchema } from "wax-prosemirror-schema"; import { EditoriaSchema } from "wax-prosemirror-schema";
import { LinkToolTipPlugin } from "wax-prosemirror-plugins"; import { LinkToolTipPlugin } from "wax-prosemirror-plugins";
import { MainMenuBar, SideMenuBar } from "wax-prosemirror-components"; import { MainMenuBar, SideMenuBar } from "wax-prosemirror-components";
...@@ -61,12 +61,10 @@ const shortCuts = { ...@@ -61,12 +61,10 @@ const shortCuts = {
"Shift-Ctrl-9": wrapInList(schema.nodes.ordered_list) "Shift-Ctrl-9": wrapInList(schema.nodes.ordered_list)
}; };
const keys = new CreateShortCuts({ schema: schema, shortCuts: shortCuts });
const options = { const options = {
schema, schema,
plugins, plugins,
keys shortCuts
}; };
const GlobalStyle = createGlobalStyle` const GlobalStyle = createGlobalStyle`
......
...@@ -32,13 +32,10 @@ const serializer = schema => { ...@@ -32,13 +32,10 @@ const serializer = schema => {
class Wax extends Component { class Wax extends Component {
componentWillMount() { componentWillMount() {
const { value, onChange, options } = this.props; const { value, onChange, options } = this.props;
const { schema, plugins } = options; const { schema, plugins, shortCuts } = options;
const WaxOnchange = onChange ? onChange : value => true; const WaxOnchange = onChange ? onChange : value => true;
const keys = const keys = new CreateShortCuts({ schema: schema, shortCuts: shortCuts });
options && options.keys
? options.keys
: new CreateShortCuts({ schema: schema, shortCuts: {} });
const editorContent = value ? value : ""; const editorContent = value ? value : "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment