UNPKG

@atlaskit/adf-schema

Version:

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

36 lines • 1.42 kB
import { $onePlus } from '@atlaskit/adf-schema-generator/$onePlus'; import { $or } from '@atlaskit/adf-schema-generator/$or'; import { adfNode } from '@atlaskit/adf-schema-generator/adfNode'; import { unsupportedMark } from '../marks/unsupportedMark'; import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute'; import { codeBlock } from './codeBlock'; import { extension } from './extension'; import { bulletList, orderedList } from './list'; import { mediaGroup } from './mediaGroup'; import { mediaSingle } from './mediaSingle'; import { paragraph } from './paragraph'; import { unsupportedBlock } from './unsupportedBlock'; var blockQuoteContent = [paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock, codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, extension.use('with_marks'), extension.use('with_annotation')]; export var blockquote = adfNode('blockquote').define({ defining: true, selectable: true, marks: [unsupportedMark, unsupportedNodeAttribute], content: [$onePlus($or.apply(void 0, blockQuoteContent))], attrs: { localId: { type: 'string', default: null, optional: true } } }).variant('legacy', { ignore: ['json-schema', 'validator-spec'], content: [$onePlus($or(paragraph, unsupportedBlock))], attrs: { localId: { type: 'string', default: null, optional: true } } });