UNPKG

@atlaskit/adf-schema

Version:

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

42 lines (34 loc) 1.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SEARCH_QUERY = exports.LINK = exports.INDENTATION = exports.FONT_STYLE = exports.COLOR = exports.ALIGNMENT = void 0; // # What do marks exist? // // Marks are categorised into different groups. One motivation for this was to allow the `code` mark // to exclude other marks, without needing to explicitly name them. Explicit naming requires the // named mark to exist in the schema. This is undesirable because we want to construct different // schemas that have different sets of nodes/marks. // // Groups provide a level of indirection, and solve this problem. For the immediate use-case, one // group called "not_code" would have sufficed, but this an ultra-specialised to code. // Mark group for font styling (e.g. bold, italic, underline, superscript). var FONT_STYLE = 'fontStyle'; // Marks group for search queries. exports.FONT_STYLE = FONT_STYLE; var SEARCH_QUERY = 'searchQuery'; // Marks group for links. exports.SEARCH_QUERY = SEARCH_QUERY; var LINK = 'link'; // Marks group for colors (text-color, background-color, etc). exports.LINK = LINK; var COLOR = 'color'; // They need to be on their own group so that they can exclude each other // and also work when one of them is disabled. // Marks group for alignment. exports.COLOR = COLOR; var ALIGNMENT = 'alignment'; // Marks group for indentation. exports.ALIGNMENT = ALIGNMENT; var INDENTATION = 'indentation'; exports.INDENTATION = INDENTATION;