@wordpress/block-library
Version:
Block library for the WordPress editor.
22 lines (21 loc) • 620 B
JavaScript
// packages/block-library/src/code/save.js
import { RichText, useBlockProps } from "@wordpress/block-editor";
import { escape } from "./utils";
import { jsx } from "react/jsx-runtime";
function save({ attributes }) {
return /* @__PURE__ */ jsx("pre", { ...useBlockProps.save(), children: /* @__PURE__ */ jsx(
RichText.Content,
{
tagName: "code",
value: escape(
typeof attributes.content === "string" ? attributes.content : attributes.content.toHTMLString({
preserveWhiteSpace: true
})
)
}
) });
}
export {
save as default
};
//# sourceMappingURL=save.js.map