mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
24 lines
537 B
TypeScript
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
|