UNPKG

@wordpress/block-library

Version:
17 lines (16 loc) • 579 B
import { createBlock } from "@wordpress/blocks"; // packages/block-library/src/more/transforms.js const transforms = { from: [{ type: "raw", schema: { "wp-block": { attributes: ["data-block"] } }, isMatch: (node) => node.dataset && node.dataset.block === "core/more", transform(node) { const { customText, noTeaser } = node.dataset; const attrs = {}; if (customText) attrs.customText = customText; if (noTeaser === "") attrs.noTeaser = true; return createBlock("core/more", attrs); } }] }; export { transforms as default }; //# sourceMappingURL=transforms.mjs.map