Hi, congratulations for this great course, I’m learning a lot.
I’m trying to wrap several “gutenberg editor components” into a custom component so I can repeat them as a whole but it doesn’t seem to work. This is my pretty plain component (simplified):
const EditorWrap = ( props ) => {
const { attributes: {title} }= props;
return (
<RichText
tagname="div"
multiline="p"
className="title-body"
placeholder={__('Add your title here...')}
value={ title }
onChange={ title => setAttributes( {title} ) }
/>
);
}
And I add it to my edit return function as <EditorWrap {...props} />
. The component appears in the admin, but it won’t get focus, though I can’t write in it so it’s useless.
Any help on this? Thanks in advance, Paulo.