Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Inline Styles on all native blocks #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

    • This reply was modified 3 years, 9 months ago by Ben Beard. Reason: typo
    • This reply was modified 3 years, 9 months ago by Ben Beard. Reason: made another error
    in reply to: Innerblocks embed #139125
    Ben Beard
    Participant

    Great thanks! I’ll give that a shot

Viewing 2 posts - 1 through 2 (of 2 total)