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