UNPKG

@wordpress/block-library

Version:
58 lines (54 loc) 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; const tableContentPasteSchema = _ref => { let { phrasingContentSchema } = _ref; return { tr: { allowEmpty: true, children: { th: { allowEmpty: true, children: phrasingContentSchema, attributes: ['scope'] }, td: { allowEmpty: true, children: phrasingContentSchema } } } }; }; const tablePasteSchema = args => ({ table: { children: { thead: { allowEmpty: true, children: tableContentPasteSchema(args) }, tfoot: { allowEmpty: true, children: tableContentPasteSchema(args) }, tbody: { allowEmpty: true, children: tableContentPasteSchema(args) } } } }); const transforms = { from: [{ type: 'raw', selector: 'table', schema: tablePasteSchema }] }; var _default = transforms; exports.default = _default; //# sourceMappingURL=transforms.js.map