Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Gutenberg is the 'new publishing experience' slated for introduction in WordPress 5.0, replacing TinyMCE and other aspects of the default editing experience. Find out more at https://wordpress.org/gutenberg/

0
votes
0answers
10 views

How to get color name in PanelColorSettings in custom Gutenberg block?

I am developing a custom Gutenberg block with the PanelColorSettings component to set up the background color, here is my code <PanelColorSettings title={ __( 'Color Settings' )...
0
votes
0answers
16 views

How to send custom parameter when saving a post in Gutenberg editor

Is there a way to hook into the gutenberg javascript client and send a custom parameter to the server when a post is saved?
1
vote
1answer
24 views

Gutenberg change/remove “Write your story” placeholder in custom blocks

When created a new page or post or columns blocks we get the "Write your story" placeholder. Can this be removed or replaced, in custom blocks? How?
0
votes
0answers
14 views

How to use styled-components within a custom Gutenberg block?

I'd like to use styled-components with a custom Gutenberg block that I've created. The CSS class is added by styled-components, but there is no CSS style defined for that class in either the editor ...
0
votes
1answer
34 views

Are there Gutenberg container blocks?

In web design, a key design element is the container that may contain various other content and blocks and is styled in CSS. Is there a Gutenberg container block that may contain other blocks? If so,...
0
votes
0answers
17 views

Simple way to add custom class and ids to individual Gutenberg blocks

Is there a simple way to add classnames to individual core Gutenberg blocks? Blocks is a great step toward moving to a web where HTML structurally/functionally describes elements, which are styled ...
0
votes
0answers
8 views

How to refresh the media uploader when running Gutenberg?

After installing Gutenberg, when I bring up the media uploaded while editing a post, the javascript I've been using in my plugin to refresh the images generates a TypeError error. This is the line of ...
0
votes
1answer
27 views

How to use PanelColorSettings in custom Gutenberg block?

I'm working on a custom Gutenberg block. I have used <PanelBody> <BaseControl> and <ColorPalette> to create some custom color pickers, however, it seems like it would be more ...
0
votes
1answer
37 views

Gutenberg consume wp-json data and reflect in frontend the content

I have a custom gutenberg block which is dynamically fetching custom post data via wp-json on edit. How do I persevere the data on save for the fronted? here is my custom component (preview.js) which ...
0
votes
1answer
14 views

How do I put my frontpage featured image in a page template for home.php?

Important: I want to makes sure this is clear: I am not asking how to get the post thumbnail. I am asking how to get the featured image for single page which is created through the Gutenberg editor ...
0
votes
1answer
22 views

Gutenberg editor add a custom category as wrapper for custom blocks

As we know by the provided API from Gutenberg we can create a custom block as const { registerBlockType } = wp.blocks; registerBlockType( 'my-namespace/my-block', { }) but how do I create a ...
2
votes
1answer
43 views

How can I add a custom attribute to Gutenberg core blocks?

I'm trying to add a dropdown to Wordpress core blocks to select a data attribute that will be added to the front-end (e.g. data-attr="value-from-dropdown"). I think the solution is to add a custom ...
0
votes
1answer
26 views

How to use the @wordpress/date block in the Gutenberg editor?

It seems like there is an out of the box Date block provided by Wordpress: https://wordpress.org/gutenberg/handbook/packages/packages-date/ How can we enable/use this block, or another datepicker ...
1
vote
1answer
110 views

Block validation: Block validation failed for `my-block`

writing my own block for a download card template is the idea. i configured my Theme (could be in a single Plugin also) to add a new Block to the Gutenberg Editor. i just put my save function here. ...
0
votes
0answers
30 views

Gutenberg - What is the best way to save/update post meta?

What would be the best way in Gutenberg to save/update post meta (not from a block). I can't find an API for it. I was thinking of doing some ajax in componentDidMount using wp.ajax.post Any advice ...
0
votes
1answer
27 views

Gutenberg - is it ok to load dependencies multiple times?

Gutenberg comes with its own dependencies, lets say React and React DOM... If I'm building a plugin, should I add the same dependencies for it? Wouldn't that mean that it loads React twice and it ...
-1
votes
1answer
41 views

Relative links in Gutenberg

I'm developing a site on my local machine and am now adding the content that I want to go live with. But I noticed that when I add a link in the new Gutenberg editor, the link is absolute, e.g. it's ...
2
votes
1answer
78 views

Validation error: Extending Gutenberg gallery block

I am trying to extend the Gutenberg core/gallery block to add some new functionality to my image gallery on the frontend. I have created a separate plugin to handle this task. I have registered my ...
1
vote
1answer
48 views

Gutenberg RichText

I'm using the RichText API for a custom block: <RichText tagName="a" className="button" placeholder={ __( 'Button text...' ) } value={ buttonText } onChange={ ( value ) => ...
2
votes
0answers
59 views

Gutenberg blocks - processing server data within a block

I have a block that renders titles of all existing posts in the <Modal/>. I retrieve it from the server using <ServerSideRender/> (that returns plain html). I want to be able to choose one ...
2
votes
1answer
61 views

WordPress Gutenberg get page template value when post updated?

I need to get the page template name when the post is saved. It fails in save_post hook as $_POST('page_template') is not available. Gutenberg saves post via the REST API and uses ...
-1
votes
1answer
130 views

Call to undefined function upload_is_user_over_quota()

I have two different multisites: www.example.org www.example-two.org On both sites, there are 5 sub-sites. They're hosted on the same server (that I have setup myself using VirtualMin). All 10 sub-...
0
votes
2answers
44 views

Error After Installing Gutenberg plugin (caused by attempt to stop WP from stripping out tags)

I installed the Gutenberg plugin today to try it out. I’m getting an error message both at the top of my WP dashboard, and when I go to view the site in a browser: Warning: call_user_func_array() ...
1
vote
1answer
54 views

Will Gutenberg Have a Negative Impact on Page Speed?

When WordPress includes Gutenberg by default, will WordPress sites suffer from slower page loading times? While it’s easy to test on a clean install, other factors, such as themes and plugins can ...
1
vote
1answer
51 views

Gutenberg custom block plugin with custom image sizes

I am using a custum gutenberg block plugin for wordpress(https://neliosoftware.com/blog/how-to-create-your-first-block-for-gutenberg/) This block is using an image but always choosing the full size ...
0
votes
1answer
18 views

Why is the 'Gutenberg' Plugin generating an 'Inconsistent File Permissions' error when other Plugins, with the same permissions, do not?

Earlier, I logged into a WordPress Dashboard I manage and saw that WordPress' 'Gutenberg' Plugin required updating along with a couple of other Plugins. All Plugins updated fine, with the exception ...
2
votes
1answer
32 views

Activate Gutenberg in category-descriptions

I'm trying to convert my sites to Gutenberg. I like it!! But how do I make it possible to make category-descriptions using the new editor?
10
votes
2answers
814 views

How does Gutenberg handle translations in React?

I was going through the source code of Gutenberg, for e.g. this and cannot understand how they handle translations... They do import this import { __ } from '@wordpress/i18n' and then in the source ...
0
votes
2answers
85 views

Custom Gutenberg block is not showing up in inserter dialog

I am trying to build the simplest of custom Gutenberg block by referring the handbook https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type/. The directory structure is as ...
4
votes
1answer
207 views

Extend core block in Gutenberg

for a project I have to extend the core block core/cover-image. For the first basic try I came up with the following code: PHP: add_action('enqueue_block_editor_assets', function() { ...
5
votes
1answer
246 views

In Gutenberg, now that withAPIData is being deprecated, how can I do an async call to a custom endpoint?

I have this working in my plugin and all is well with the world: edit: withAPIData( props => { return { roles: '/matt-watson/secure-blocks/v1/user-roles/' };...
0
votes
2answers
36 views

Wordpress Editor completely blank [closed]

Although the classic editor works, I am unable to use Gutenberg. When I disable plugins in wp-content (by changing plugins to pluginsOLD), I can edit everything just fine. How can I restore the new ...
1
vote
2answers
114 views

How to check whether Gutenberg editor is installed or not [duplicate]

i want to ask a simple question that what to do if i have to check whether a pliugin is installed. for example i want to run a code, which says, if Gutenberg is installed, then run the following code ...
0
votes
1answer
47 views

Gutenberg Block empty after reload of editor

Well, everythings fine with this. editor and frontend works. but when i come back to pages edit screen, the block is empty. i think there is an error with the attributes, but i can't find good ...
1
vote
0answers
75 views

Gutenberg Editor - Template Doesn't Match Error

I have updated the current page template so that it is locked and uses two of custom blocks that i have created. function.php function my_add_template_to_posts() { $post_type_object = ...
0
votes
1answer
72 views

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?...
2
votes
1answer
179 views

Help Unregistering a Core Block Type in Gutenberg

I'm trying to unregister core block types in WordPress Gutenberg. I've used the code provided here: https://github.com/WordPress/gutenberg/blob/master/docs/extensibility/extending-blocks.md#removing-...
3
votes
2answers
128 views

Check what Gutenberg blocks are in post_content

I'm working on a design that has different styling if a certain Gutenberg block is present on a page. In other words, if the first block is a custom built Gutenberg block, the post_title is rendered ...
8
votes
2answers
264 views

check if Gutenberg is currently in use

How can I check if the editor that is currently being used is Gutenberg in a WordPress plugin? I need this because Gutenberg lacks post_submitbox_misc_actions, so I need a fallback which will only be ...
2
votes
1answer
134 views

Gutenberg add a custom metabox to default blocks

Is it possible to add custom meta boxes to the default blocks in Gutenberg? I would need to add a user-defined data-attribute to each block. This data-attribute then would be printed on the frontend ...
0
votes
1answer
40 views

Preventing double loading JS scripts (like React) when developing for Gutenberg

Gutenberg is mostly made in JS, so I'm using create-guten-block to create some custom blocks. If multiple plugins use this to create blocks, is it a problem that these scripts get compiled and loaded ...
0
votes
0answers
29 views

Spans in gutenberg

How can I make a user automatically add spans in the Gutenberg editor? I want to create a "feedback" block - an example from the link: http://bogdans-ultra-awesome-project-10773e.webflow.io But the ...
0
votes
0answers
119 views

iFrame onLoad in custom Gutenberg block

I have this code that I am trying to rewrite for Gutenberg block: <script type="text/javascript"> <iframe onload="javascript:resizeIframe(this);" src="/...
0
votes
0answers
19 views

Global InspectorElement not saving value when published

I'm trying to create a global InspectorElement fields that are going to be available for all blocks. Here's what I came up with. The problem is that when I publish the post, the field values weren't ...
6
votes
1answer
627 views

Add custom class to core blocks in Gutenberg

I'm trying to add a class to list blocks (core/list) in Gutenberg. Unfortunately, it looks like because some blocks like lists and paragraphs don't have the standard default class name of wp-block-{...
3
votes
1answer
138 views

Integrating inline tinymce editor in a component for a gutenberg block

I'm new to stack exchange. I hope my question is not to long. I want to integrate an inline tinymce editor in a component and use it in a gutenberg block. But my editors ui conflicts with gutenberg. (...
2
votes
1answer
195 views

Gutenberg block “This block appears to have been modified externally” on save

Just starting to play with Gutenberg block development, and I am building a very simple button (yes I know buttons are already included, but this block will have lots of settings and classes not ...
0
votes
0answers
47 views

Gutenberg: move block plugin between Wordpress sites?

I created a Gutenberg block plugin on one computer in a local site using create-guten-block. It works fine. I'm trying to copy/move it to a different Wordpress install on another computer, and no ...
1
vote
0answers
40 views

Gutenberg: Dynamic rendering of RichText

When I save <RichText />s content into my attributes and want to use this with render_callback in php, it get's kinda messy. As soon as the text contains RichText (bold, italic, line-breaks etc.)...
2
votes
0answers
46 views

Gutenberg: How to mix dynamic and static output?

Gutenbergs handbook (https://wordpress.org/gutenberg/handbook/blocks/creating-dynamic-blocks/) suggests to return null in the save() function for dynamic blocks. But what if I only want parts of my ...