1
0
mirror of https://github.com/writeas/writefreely synced 2025-02-01 22:26:52 +01:00
writefreely/prose/schema.js
2021-01-08 00:33:35 +01:00

22 lines
574 B
JavaScript

import { schema } from "prosemirror-markdown";
import { Schema } from "prosemirror-model";
export const writeFreelySchema = new Schema({
nodes: schema.spec.nodes
.remove("blockquote")
.remove("horizontal_rule")
.addToEnd("readmore", {
inline: false,
content: "",
group: "block",
draggable: true,
toDOM: (node) => [
"div",
{ class: "editorreadmore", style: "width: 100%;text-align:center" },
"Read more...",
],
parseDOM: [{ tag: "div.editorreadmore" }],
}),
marks: schema.spec.marks,
});