Questions tagged [gutenberg-blocks]
515 questions
0
votes
1 answer
`edit()` that returns modal throws exception
I have a simple button that's supposed to launch the modal straight from the Modal example:
edit: withState( {
isOpen: false,
} )( ( { isOpen, setState } ) => (

Gezim
- 7,112
- 10
- 62
- 98
0
votes
1 answer
How to make bootstrap containers work in gutenburg alignfull
I've made a gutenburg .alignfull class
margin-left : calc( -100vw / 2 + 100% / 2 );
margin-right : calc( -100vw / 2 + 100% / 2 );
max-width : 100vw;
Which works nicely.
I've put a bootstrap container in...
…

arthurrandom
- 58
- 2
- 7
0
votes
1 answer
Jquery in Wordpress Gutenberg Block not firing on edit screen
I've got a google map rendering in a Gutenberg custom block - works fine on the front end page, doesn't trigger when editing at all.
This is the offending bit of javascript with in the php block render function
var…

andymoyle
- 438
- 4
- 13
0
votes
1 answer
Gutenberg block throwing error after upgrade from 3.6.2 to 3.7.0
I created a block which pulls content from a CPT. I had no errors and everything worked correctly within the Gutenberg editor until I upgraded from Gutenberg 3.6.2 to 3.7.0. I went through the 3.7.0 changelog and nothing looked questionable at first…

epierpont
- 321
- 1
- 9
0
votes
1 answer
Gutenberg block show something when element is selected
I'm building a Gutenberg block and am trying to show an input when an element is selected.

CyberJ
- 1,018
- 1
- 11
- 24
0
votes
1 answer
Add Color Settings To Wordpress Gutenberg Headers
How do I add color settings to the Gutenberg Header block? I've added theme support for paragraphs with this...
function apache_theme_supported_features() {
add_theme_support( 'editor-color-palette', array(
array(
'name' =>…

Troy Riemer
- 85
- 10
0
votes
1 answer
Gutenberg meta information is saved as HTML comment in post_content field
I am very new to Gutenberg and just started learning block development. Today I have tried to create a meta field taking references of this and this.
This is how I registered the meta field for my custom post type:
function gb_meta_box_init() {
…

Subrata Sarkar
- 2,975
- 6
- 45
- 85
0
votes
1 answer
How to assign iframe url query param value for React Gutenberg attribute
I am developing a custom Gutenberg block. I take a few inputs (title, button text, etc) and an iframe gets displayed. The values of these attributes are query params in iframe's url. When I try to edit that block, I am trying to pull these values…

ivanacorovic
- 2,669
- 4
- 30
- 46
0
votes
0 answers
Gutenberg withAPIData HOC not fetching on page reload
Followed this example from Gutenberg handbook
It's fetching post normally on block add. But after saving and reloading post edit page there is no data and stuck in 'loading' state
{get: ƒ, isLoading: true, path: "/wp/v2/posts?per_page=4", create:…

Valentin
- 11
- 4
-1
votes
0 answers
JSX splitting a WordPress block API component into different files
I am building a WordPress block API plugin and my Edit component is getting a bit large I would like to split up the functions and the JSX into to different files.
I have thought about splitting it into to components but the functions need access to…

franka
- 33
- 6
-1
votes
1 answer
Wordpress "Convert To Blocks" not working: always return HTML block
I have a peculiar problem with Wordpress (latest version), using the Dox (child) theme. I never had this problem before.
I don't have the Classic plugin installed, as I am very happy using blocks.
When I do a new Block Group, like a normal layout of…

gege
- 91
- 7
-1
votes
1 answer
How to add Custom Device Type for the Gutenberg Preview Option?
I found the following component and wondering how could I create a custom device type /breakpoint for Editor Preview.
https://github.com/WordPress/gutenberg/tree/trunk/packages/block-editor/src/components/preview-options
Then I would like to add all…

tomektomczuk
- 175
- 2
- 6
-1
votes
1 answer
Gutenberg server side rendered (dynamic) block - attributes don't update in editor
I'm making Wordpress server side rendered block and it works well on frontend, but in editor attributes don't save (I have always default value in editor, although on frontend there is my saved value).
This is my code (not whole but minimal…

maja
- 175
- 5
- 17
-1
votes
1 answer
Show a div while checked is on true, Custom Gutenberg Block
I a clue to show a div whenever the user check an input with the type of checkbox.
To see the behavior i'm waiting for, i share you a screenshot of what the display looks like.
So as you can see i want to show a div with the possibility to add a…

Anton
- 59
- 8
-1
votes
1 answer
Add extra attributes to link in wordpress gutenberg editor
I would like to add a couple of custom attributes to the link popup on the Gutenberg editor in wordpress. Would like to have something in the following lines:
There is currently a pending issue for the same on the Gutenberg's Github page:…

Shashi Deshetti
- 1,354
- 2
- 11
- 22