JavaScript for WordPress › Forums › Gutenberg Development › Inline Styles on all native blocks › Reply To: Inline Styles on all native blocks
July 23, 2020 at 11:42 am
#142309
Ben Beard
Participant
Sorry, I tried to edit to include more info…
So I added an extra attribute to store the background img url (named backgroundImg)
I am trying to use blocks.getSaveContent.extraProps to apply the background image to the inline style like so..
if ("wp-block-column" === props.className) {
return lodash.merge(props, {
style: {
backgroundImage: "url(" + props.backgroundImg + ")",
},
});
}
What am I missing