Commit 71d85d77 authored by chris's avatar chris

CreateShortCuts move to core

parent e5edb330
......@@ -17,7 +17,7 @@ import {
goToNextCell
} 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 { LinkToolTipPlugin } from "wax-prosemirror-plugins";
import { MainMenuBar, SideMenuBar } from "wax-prosemirror-components";
......@@ -61,12 +61,10 @@ const shortCuts = {
"Shift-Ctrl-9": wrapInList(schema.nodes.ordered_list)
};
const keys = new CreateShortCuts({ schema: schema, shortCuts: shortCuts });
const options = {
schema,
plugins,
keys
shortCuts
};
const GlobalStyle = createGlobalStyle`
......
......@@ -32,13 +32,10 @@ const serializer = schema => {
class Wax extends Component {
componentWillMount() {
const { value, onChange, options } = this.props;
const { schema, plugins } = options;
const { schema, plugins, shortCuts } = options;
const WaxOnchange = onChange ? onChange : value => true;
const keys =
options && options.keys
? options.keys
: new CreateShortCuts({ schema: schema, shortCuts: {} });
const keys = new CreateShortCuts({ schema: schema, shortCuts: shortCuts });
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