writefreely/prose/schema.js

20 lines
477 B
JavaScript
Raw Normal View History

2021-01-07 23:33:35 +00:00
import { schema } from "prosemirror-markdown";
import { Schema } from "prosemirror-model";
export const writeFreelySchema = new Schema({
2021-01-07 23:33:35 +00:00
nodes: schema.spec.nodes
.addToEnd("readmore", {
inline: false,
content: "",
group: "block",
draggable: true,
toDOM: (node) => [
"div",
{ class: "editorreadmore" },
2021-01-07 23:33:35 +00:00
"Read more...",
],
parseDOM: [{ tag: "div.editorreadmore" }],
}),
marks: schema.spec.marks,
});