debian-mirror-gitlab/app/assets/javascripts/behaviors/markdown/schema.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
388 B
JavaScript
Raw Normal View History

2019-03-02 22:35:43 +05:30
import { Schema } from 'prosemirror-model';
import editorExtensions from './editor_extensions';
2022-05-07 20:08:51 +05:30
const nodes = editorExtensions.nodes.reduce(
(ns, { name, schema }) => ({
...ns,
[name]: schema,
}),
{},
);
2019-03-02 22:35:43 +05:30
2022-05-07 20:08:51 +05:30
const marks = editorExtensions.marks.reduce(
(ms, { name, schema }) => ({
...ms,
[name]: schema,
}),
{},
);
2019-03-02 22:35:43 +05:30
export default new Schema({ nodes, marks });