1 | import { layoutSectionWithSingleColumn } from './nodes';
|
2 | import { border } from './marks';
|
3 | import { createSchema } from './create-schema';
|
4 | var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
5 | var defaultSchemaConfig = {
|
6 | nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
|
7 | marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
8 |
|
9 | 'fragment']
|
10 | };
|
11 | return defaultSchemaConfig;
|
12 | };
|
13 | export var defaultSchemaConfig = getDefaultSchemaConfig();
|
14 | export var getSchemaBasedOnStage = function getSchemaBasedOnStage() {
|
15 | var stage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'final';
|
16 | var defaultSchemaConfig = getDefaultSchemaConfig();
|
17 | if (stage === 'stage0') {
|
18 | defaultSchemaConfig.customNodeSpecs = {
|
19 | layoutSection: layoutSectionWithSingleColumn
|
20 | };
|
21 | defaultSchemaConfig.customMarkSpecs = {
|
22 | border: border
|
23 | };
|
24 | }
|
25 | return createSchema(defaultSchemaConfig);
|
26 | };
|
27 | export var defaultSchema = getSchemaBasedOnStage(); |
\ | No newline at end of file |