UNPKG

@atlaskit/adf-schema

Version:

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

34 lines (32 loc) 783 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.indentation = void 0; var _groups = require("../groups"); /** * @name indentation_mark */ var indentation = { excludes: "indentation ".concat(_groups.ALIGNMENT), group: _groups.INDENTATION, attrs: { level: {} }, parseDOM: [{ tag: 'div.fabric-editor-indentation-mark', getAttrs: function getAttrs(dom) { var level = +(dom.getAttribute('data-level') || '0'); return { level: level > 6 ? 6 : level < 1 ? false : level }; } }], toDOM: function toDOM(mark) { return ['div', { class: 'fabric-editor-block-mark fabric-editor-indentation-mark', 'data-level': mark.attrs.level }, 0]; } }; exports.indentation = indentation;