Created
December 14, 2016 06:38
-
-
Save copperwall/e2c2fa5d860b82a61d65bb49bec6a7a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const simpleSchema = new Schema({ | |
nodes: { | |
doc: {content: "paragraph+"}, | |
paragraph: { | |
content: "inline<_>*", | |
group: "block", | |
parseDOM: [{tag: "p"}], | |
toDOM() { return ["p", 0] } | |
}, | |
text: { | |
group: "inline", | |
toDOM() { return node.text } | |
} | |
}, | |
marks: { | |
bold: { | |
parseDOM: [{tag: "i"}, {tag: "em"}, | |
{style: "font-style", getAttrs: value => value == "italic" && null}], | |
toDOM() { return ["em"] } | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment