Files
continuwuity/packages/loro-demo/src/lib/prosemirror/schema.ts
T
2024-03-06 20:46:15 +00:00

24 lines
537 B
TypeScript

import { Schema } from 'prosemirror-model';
import { nodes, marks } from 'prosemirror-schema-basic';
export const EXPAND_CONFIG: { [key in string]: { expand: "before" | "after" | "both" | "none"; } } = {
bold: { expand: "after" },
italic: { expand: "after" },
underline: { expand: "after" },
link: { expand: "none" },
heading: { expand: "none" },
}
/**
* Schema to represent rich text
* @type {Schema}
*/
export const richTextSchema = new Schema({
nodes,
marks
});
// richTextSchema.nodes.heading