UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

17 lines (16 loc) 762 B
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups'; // We use groups to allow schemas to be constructed in different shapes without changing node/mark // specs, but this means nodes/marks are defined with groups that might never be used in the schema. // In this scenario ProseMirror will complain and prevent the schema from being constructed. function groupDeclaration(name) { return { name: "__".concat(name, "GroupDeclaration"), spec: { group: name } }; } export var markGroupDeclarations = [groupDeclaration(COLOR), groupDeclaration(FONT_STYLE), groupDeclaration(SEARCH_QUERY), groupDeclaration(LINK)]; export var markGroupDeclarationsNames = markGroupDeclarations.map(function (groupMark) { return groupMark.name; });