Complete the code to define a block attribute named 'content' of type string.
attributes: { content: { type: [1] } }The attribute 'content' should be of type string to hold text data.
Complete the code to add a TextControl inside the block's edit function to edit the 'content' attribute.
return (<TextControl value={attributes.content} onChange={value => setAttributes({ [1]: value })} />);
The attribute to update is named content, so it must be used as the key in setAttributes.
Fix the error in the block's save function to correctly output the 'content' attribute inside a paragraph.
return (<p>[1]</p>);
In the save function, the block's attributes are accessed via the attributes object.
Fill both blanks to define a block attribute 'alignment' with type string and default value 'left'.
attributes: { alignment: { type: [1], default: [2] } }The 'alignment' attribute should be a string with a default value of 'left'.
Fill all three blanks to create a block control that updates the 'alignment' attribute using a SelectControl with options 'left', 'center', and 'right'.
return (<SelectControl label="Alignment" value={attributes.[1] options={[{ label: 'Left', value: 'left' }, { label: 'Center', value: 'center' }, { label: 'Right', value: 'right' }]} onChange={value => setAttributes({ [2]: value })} />);
The attribute name is 'alignment' and must be used consistently for value and setAttributes keys.