diff --git a/editors/editoria/src/Editoria.js b/editors/editoria/src/Editoria.js index c3a2218c6d0ed3f4347d549b225334435739494e..c7877c017c5c2978b649431f0a3f6eb1dc2f49a7 100644 --- a/editors/editoria/src/Editoria.js +++ b/editors/editoria/src/Editoria.js @@ -12,7 +12,6 @@ import text from "./text"; const options = { schema, plugins, - keys, rules }; diff --git a/wax-prosemirror-core/src/Wax.js b/wax-prosemirror-core/src/Wax.js index 4d0c0c1421c97ee0439340b0e00f193c90cf7d8b..46650eb9ad9a9d56250fc2f89564e34375b63fb4 100644 --- a/wax-prosemirror-core/src/Wax.js +++ b/wax-prosemirror-core/src/Wax.js @@ -43,10 +43,9 @@ class Wax extends Component { const { schema, plugins, keys, rules } = options; const WaxOnchange = onChange ? onChange : value => true; - const WaxKeys = - options && options.keys - ? options.keys - : new CreateShortCuts({ schema: schema, shortCuts: {} }); + const WaxShortCuts = keys + ? keys + : new CreateShortCuts({ schema: schema, shortCuts: {} }); const WaxRules = new CreateRules({ schema: schema, rules: rules }); @@ -54,7 +53,7 @@ class Wax extends Component { const finalPlugins = defaultPlugins.concat([ placeholder({ content: this.props.placeholder }), - WaxKeys, + WaxShortCuts, WaxRules ]); if (plugins) finalPlugins.push(...plugins); diff --git a/wax-prosemirror-schema/src/EditoriaSchema.js b/wax-prosemirror-schema/src/EditoriaSchema.js index 52ee19cff32ab1e82a3b1347b6a8029409cc4ffa..caec4d85651b3129da8d3580b2ee098266cf0910 100644 --- a/wax-prosemirror-schema/src/EditoriaSchema.js +++ b/wax-prosemirror-schema/src/EditoriaSchema.js @@ -1,6 +1,7 @@ // Npdes const pDOM = ["p", 0], - brDOM = ["br"]; + brDOM = ["br"], + blockquoteDOM = ["blockquote", 0]; //Marks const emDOM = ["em", 0], @@ -477,6 +478,15 @@ const EditoriaSchema = { return ["li", attrs, 0]; }, defining: true + }, + blockquote: { + content: "block+", + group: "block", + defining: true, + parseDOM: [{ tag: "blockquote" }], + toDOM() { + return blockquoteDOM; + } } }, marks: {