Closed aadilayub closed 11 months ago
Sorry, closing. Turns out this error was happening because of a trival typo in edit.js
🤦
I was using
return (
<RichText
{ ...useBlockProps }
tagName='div'
onChange={ onChangeContent }
value={ attributes.content }
placeholder='Enter some text here...'
/>
);
instead of
return (
<RichText
{ ...useBlockProps() }
tagName='div'
onChange={ onChangeContent }
value={ attributes.content }
placeholder='Enter some text here...'
/>
);
Overview
Feedback Details
Hi! So I'm going through the "Introduction to Block Development" course on learn.wordpress.org. It's been very easy to follow so far - however, when I got to the 'Block Supports' tutorial, I noticed none color,padding, background color customizations were showing up in the editor.
Here's how the block looks on the front-end:
versus the editor:
Note how the block has padding and colors applied in the settings panel.
I saw this error in the console, perhaps it's related?
I copy-pasted the exact code from the tutorial in
save.js
, just to be sure. My local environment is set up using thecreate-block
andwp-env
tools.Next steps for Training Team member
Please follow the team handbook "Validating Content Feedback issues" to validate this feedback.