Replies: 0
I try to add a transform which should transform paragraphs to my custom block, what am I doing wrong?
transforms: {
from: [
{
type: "block",
priority: 7,
blocks: ["core/paragraph"],
transform: function (attributes, innerBlocks) {
return createBlock("create-block/callout-shadow-box", {
attributes,
innerBlocks,
});
},
},
],
to: [
{
type: "block",
blocks: ["core/paragraph"],
transform: (attributes, innerBlocks) =>
createBlock("create-block/callout-shadow-box", {
attributes,
innerBlocks,
}),
},
],
},