Welcome to mirror list, hosted at ThFree Co, Russian Federation.

schema.js « markdown « behaviors « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1b0f46ff4cbcbf4f1940d3f8512bfe93892e2cef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Schema } from 'prosemirror-model';
import editorExtensions from './editor_extensions';

const nodes = editorExtensions.nodes.reduce(
  (ns, { name, schema }) => ({
    ...ns,
    [name]: schema,
  }),
  {},
);

const marks = editorExtensions.marks.reduce(
  (ms, { name, schema }) => ({
    ...ms,
    [name]: schema,
  }),
  {},
);

export default new Schema({ nodes, marks });