Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

transform with innerBlocks not working

$
0
0

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,
}),
},
],
},

  • This topic was modified 21 minutes ago by jeremiva.

Viewing all articles
Browse latest Browse all 59525

Trending Articles