UNPKG

@wordpress/block-library

Version:
24 lines (23 loc) 606 B
// packages/block-library/src/html/transforms.js import { createBlock } from "@wordpress/blocks"; import { create } from "@wordpress/rich-text"; var transforms = { from: [ { type: "block", blocks: ["core/code"], transform: ({ content: html }) => { return createBlock("core/html", { // The code block may output HTML formatting, so convert it // to plain text. content: create({ html }).text }); } } ] }; var transforms_default = transforms; export { transforms_default as default }; //# sourceMappingURL=transforms.js.map