UNPKG

@wordpress/block-library

Version:
50 lines (48 loc) 941 B
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 }] }; export default transforms; //# sourceMappingURL=transforms.js.map