@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
31 lines • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var prosemirror_1 = require("../../prosemirror");
// TS doesn't generate type if we destructure here
var nodes = prosemirror_1.tableNodes({
tableGroup: 'block',
cellContent: 'block+',
cellAttributes: {
background: {
default: null,
getFromDOM: function (dom) {
return dom.style.backgroundColor || null;
},
setDOMAttr: function (value, attrs) {
if (value) {
attrs.style = (attrs.style || '') + ("backgroundcolor: " + value + ";");
}
}
}
}
});
var table = tslib_1.__assign({}, nodes.table, { content: 'tableRow+' });
exports.table = table;
var tableCell = nodes.table_cell;
exports.tableCell = tableCell;
var tableHeader = nodes.table_header;
exports.tableHeader = tableHeader;
var tableRow = tslib_1.__assign({}, nodes.table_row, { content: '(tableCell | tableHeader)*' });
exports.tableRow = tableRow;
//# sourceMappingURL=tableNodes.js.map