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
31
votes
9 answers

Remove Gutenberg CSS

I have Gutenberg plugin installed in WordPress v4.9.8 and am trying to remove the CSS that comes with it so I can supply my own. This is the sheet that gets included:
Matt Saunders
  • 2,994
  • 5
  • 25
  • 43
20
votes
5 answers

How to add new panel under "document" in Gutenberg

I am trying to add a new component panel under document tab, like categories, featured image etc.
daniyalahmad
  • 2,703
  • 5
  • 24
  • 50
13
votes
1 answer

Wordpress Gutenberg Media Upload Video Gallery

I want to have exactly the Media Upload Popup that is used when supplying the gallery attribute to the Component. Difference to normal Mediaupload is, that you see a sidebar on the left, and after selecting the items, you reach a view,…
niklas
  • 2,734
  • 3
  • 31
  • 62
11
votes
3 answers

How to disable Gutenberg / block editor for certain post types?

WordPress added Gutenberg / block editor in its 5th version and it's enabled by default for Post and Page post types. It might be enabled by default for all custom post types in close future so as a WordPress developer I want to know how to disable…
Hossein
  • 1,866
  • 3
  • 19
  • 35
9
votes
4 answers

Gutenberg editor content in JavaScript (WordPress)

Back in TMCE days, we could easily get editor content with editor.getContent(). However in new Gutenberg editor, I can't find a method to do that. I need all editor content as HTML (the way it will be saved in database). I found wp.block.serialize()…
shramee
  • 3,632
  • 19
  • 37
8
votes
1 answer

Is there a way to refresh the category list that is used in a custom component if a user adds a new category using the editor itself?

I have built a custom component for wordpress's gutenberg editor. I needed a way to select a single category from a list of already selected categories. I was able to achieve this kind of functionality with the code below. The only issue with my…
Josh Balcitis
  • 668
  • 3
  • 16
8
votes
2 answers

Gutenberg editor scroll block into view

How can I scroll a newly inserted block into the view in the wordpress gutenberg editor? I am creating the block with const nextBlock = createBlock( 'core/paragraph' ); wp.data.dispatch( 'core/editor' ).insertBlock( nextBlock ); //scroll the block…
niklas
  • 2,734
  • 3
  • 31
  • 62
8
votes
2 answers

Use page Title in Gutenberg custom banner block

I have created a custom banner image block for Gutenberg, which works great, but I want to know if it is possible to use the page title as the current banner text placeholder until it has been edited? My Edit function is return [ …
Jim-miraidev
  • 1,518
  • 1
  • 7
  • 20
8
votes
2 answers

Gutenberg - Multiple InnerBlocks in one block-type

I am trying to make custom columns block since the wordpress default used by gutenberg is not what I need. So i have looked up how it works, its uses InnerBlocks block with a layout definition, but there is no way to specify the html tag and the…
Erik Kubica
  • 851
  • 1
  • 10
  • 34
7
votes
1 answer

Can I use Javascript to update a default class in the Wordpress Editor?

In the WordPress Gutenberg Editor, I am trying to programmatically set a default class on an image block, which is applied without the user manually adding it via the 'Additional CSS' field. I have tried applying a default style on image blocks,…
7
votes
1 answer

WordPress Gutenberg blocks: How to restrict page-level blocks, but allow all child-level blocks

In a WordPress plugin I have created some custom 'layout' Gutenberg blocks. These are basically 'boxes' that contain the rest of the page contents. I'd like to restrict the user to adding only these boxes into a page, but then allowing them to place…
Projectitis
  • 303
  • 1
  • 6
7
votes
4 answers

Custom Taxonomy not showing in Post Gutenberg editor

I have registered a custom taxonomy in Wordpress, and I can't work out why it is not displaying in standard Wordpress posts, since Gutenberg has been introduced. What I mean by this, is that it does not display in the document sidebar when adding or…
dungey_140
  • 1,918
  • 5
  • 21
  • 51
7
votes
2 answers

WordPress Gutenberg: This block contains unexpected or invalid content

I am creating very simple text block. The block works fine when I add this for the first time. If I refresh the page and try to edit the block it show me the message "This block contains unexpected or invalid content.". I have tried to disable…
7
votes
2 answers

HTML entities are not being decoded when using WordPress REST API for Gutenberg blocks

I am building a custom Gutenberg block that makes a request to the WordPress REST API to get some Posts. I'm using axios to make the request to the REST endpoint. When the result comes back, there is an array of Post objects, and I can see the…
codewithfeeling
  • 4,919
  • 5
  • 35
  • 46
7
votes
2 answers

Wordpress Gutenberg: React components on front end

Gutenberg is still pretty new, but I'm still hoping someone has encountered this issue and found a solution. I've used create-guten-block to boilerplate a project and created a test block. The problem I'm running into is that when I try to use a…
1
2 3
52 53