Questions tagged [wordpress-gutenberg]

Gutenberg is the visual editor for WordPress. A question tagged wordpress-gutenberg should be related to usage or modification of the Gutenberg editor. These are best asked on Stack Exchange WordPress Development.

Gutenberg is the new visual editor for WordPress. Introduced in WordPress 5.0, it provides tools for creating more flexible and media rich posts/pages. Gutenberg posts are composed of "blocks" which can be inserted, rearranged, and styled to create more complex layouts and formats, while not requiring as much technical knowledge from your average user. Gutenberg utilizes the WordPress REST API and React.

A basic understanding of JavaScript frameworks, specifically React, is recommended for Gutenberg development, and more in-depth editing may require a primary knowledge of state management patterns, such as Redux.

Questions with this tag should be related to either using the new Gutenberg editor or modifying and extending the editor's default functionality (blocks, filters, formats, etc).

General Information: https://wordpress.org/gutenberg/

Gutenberg Handbook: https://developer.wordpress.org/block-editor/

Block API: https://developer.wordpress.org/block-editor/developers/block-api/

GitHub: https://github.com/WordPress/gutenberg

React: https://reactjs.org/

795 questions
0
votes
1 answer

WordPress Gutenberg RichText not displaying HTML

As shown in the code snippet below, I am trying to append HTML or JSX to RichText content in vain. const { registerBlockType } = wp.blocks; const { RichText } = wp.editor; registerBlockType( /* ... */, { // ... attributes: { …
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
  • 579
  • 1
  • 6
  • 16
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' =>…
0
votes
1 answer

Gutenberg returns error 500 on save on certain pages

I have website which has Gutenberg and it is very important part of it, problem is.. When i enter page and try to save it i get error 500, in console i have this error in console POST https://myDomain/wp-json/wp/v2/pages/5950 500 () POST…
Armin
  • 365
  • 2
  • 12
0
votes
0 answers

How to create a React.js file in PhpStorm for WordPress Gutenberg

So I am learning on how to work with Gutenberg, and a lot of these tutorials are showing their code in .jsx I believe. I've done a lot of looking up but am unsure if I'm doing this right. I've tried using a TypeScript file, and when I paste the…
Nick M
  • 1
  • 1
0
votes
1 answer

wordpress gutenberg alignwide and alignfull problem

i am playing with the new gutenberg editor of wordpress. i have enabled alignwide and alignfull on my theme (which is using materialize), and i use these css rules for them, but it doesn't work properly. this is how the alignwide looks. and this…
Ron
  • 317
  • 6
  • 20
0
votes
1 answer

wordpress gutenberg validation error on save function

so i am playing with wordpress gutenberg block dev. and already made some simple one. now i am trying to make a more complicated one of a slider. everything works untill the save function where i get validation error and a bizzare notice about…
Ron
  • 317
  • 6
  • 20
0
votes
1 answer

Cannot read property 'getCollectionByRoute' of undefined - Gutenberg wordpress

Gutenberg Editor In worpdress keep crashing from time ti time and i get the message "The editor has encountered an unexpected error". When I open the console I get a React error that said:" Cannot read property 'getCollectionByRoute' of…
nemo
  • 49
  • 8
0
votes
2 answers

Use Wordpress shortcode function to render Gutenberg block, sending the attributes as parameters

I have a shortcode that generates a gallery, given the gallery ID. function rb_scroll_gallery_shortcode( $atts, $content ) { $a = shortcode_atts( array( 'id' => -1, ), $atts ); $gallery_ID = $a['id']; $output = ''; …
Raba
  • 167
  • 12
0
votes
1 answer

What are the alternatives for TinyMCE getContent and setContent functions for Gutenberg?

Using TinyMCE editor, we used getContent() and setContent() JS functions to get the contents of the editor and set it What are the alternatives for them using Gutenberg?
Atef
  • 561
  • 1
  • 5
  • 18
0
votes
1 answer

How do I save global inspector controls in Gutenberg editor?

I'm new to WP's gutenberg and React(but not WP/PHP). I'm trying to add a series of custom controls that show up on all core blocks. Using the WP documentation, I was able to add a new inspector section with a simple toggle: var el =…
0
votes
1 answer

Wordpress - Gutenberg - shortcode not rendering

I've switched on Gutenberg and am trying to create a shortcode on a page. This is my code in functions.php // Enable shortcodes in text areas add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); //…
Wasteland
  • 3,709
  • 10
  • 33
  • 64
0
votes
1 answer

Q: Richtext editor with h1 title and p subtitle

Hi So i'm trying to make a richtext block where the First line will be a h1, and when u press enter u get to type a pharagraph, I tried using the multiline attribute with a value of "p" but that doesn't work, I wonder if anyone can help me out. This…
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,125
  • 3
  • 23
  • 35
0
votes
1 answer

How to add more advanced fields in each Gutenberg blocks?

Is there any way to extend the advanced field section in each Gutenberg blocks? I want to add more fields in each blocks. Please help.
loQ
  • 1,976
  • 15
  • 18
1 2 3
52
53