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