@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
26 lines • 951 B
JavaScript
import * as tslib_1 from "tslib";
import { tableNodes } from '../../prosemirror';
// TS doesn't generate type if we destructure here
var nodes = 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+' });
var tableCell = nodes.table_cell;
var tableHeader = nodes.table_header;
var tableRow = tslib_1.__assign({}, nodes.table_row, { content: '(tableCell | tableHeader)*' });
export { table, tableCell, tableHeader, tableRow };
//# sourceMappingURL=tableNodes.js.map