Gutenberg block can’t save richtext

Couple of things to try – remove some of the curly braces { } because those are only needed when you’re referring to variables, and try just directly calling onChange: <div className={‘caption’}> <RichText tagName=”p” className=”imgCtaContent” onChange={ ( content ) => { setAttributes( { content } ) } } value={content} placeholder=”Enter text…” /> </div> Also in … Read more

How to get all attributes of a block in PHP?

I don’t believe you can. Not easily anyway. I’m happy to be corrected, but this is my understanding of the issue: Blocks can store their attribute in several ways. They can be stored as JSON inside the block comment, like this example from the documentation: <!– wp:latest-posts {“postsToShow”:4,”displayPostDate”:true} /–> These are the attributes that are … Read more

Extend Gutenberg block core/quote block

Do you receive any errors in the browser dev tools while you have the block editor open? One improvement that I immediately notice is that your call to the block editor should be: const { InspectorControls, getColorObjectByColorValue, } = wp.block-editor; not block.editor.