1 | import { NodeSpec, MarkSpec, Schema } from 'prosemirror-model';
|
2 |
|
3 |
|
4 |
|
5 | export declare function createSchema<N extends string = string, M extends string = string>(config: SchemaConfig<N, M>): Schema<N, M>;
|
6 | export declare function sanitizeNodes(nodes: {
|
7 | [key: string]: NodeSpec;
|
8 | }, supportedMarks: {
|
9 | [key: string]: MarkSpec;
|
10 | }): {
|
11 | [key: string]: NodeSpec;
|
12 | };
|
13 | export declare function sanitizeNodeSpecContent(nodes: {
|
14 | [key: string]: NodeSpec;
|
15 | }, rawContent: string): string;
|
16 | export interface SchemaConfig<N = string, M = string> {
|
17 | nodes: N[];
|
18 | customNodeSpecs?: SchemaCustomNodeSpecs;
|
19 | marks?: M[];
|
20 | customMarkSpecs?: SchemaCustomMarkSpecs;
|
21 | }
|
22 | export interface SchemaBuiltInItem {
|
23 | name: string;
|
24 | spec: NodeSpec | MarkSpec;
|
25 | }
|
26 | export interface SchemaCustomNodeSpecs {
|
27 | [name: string]: NodeSpec;
|
28 | }
|
29 | export interface SchemaCustomMarkSpecs {
|
30 | [name: string]: MarkSpec;
|
31 | }
|
32 | export declare const allowCustomPanel: boolean;
|