Skip to content
Snippets Groups Projects
Commit 3898d21c authored by chris's avatar chris
Browse files

add block quote schema

parent 07e43e5d
No related branches found
No related tags found
1 merge request!38Develop
......@@ -12,7 +12,6 @@ import text from "./text";
const options = {
schema,
plugins,
keys,
rules
};
......
......@@ -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);
......
// 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: {
......
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