Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [block-editor]

The Block Editor 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
17 views

Hide specific Gutenberg blocks settings

I'm sorry I asked this question before but i didn't get any answer:( There are any way to hide some Gutenberg block settings from users? Like " Crop images, Link To and Additional CSS class"
0
votes
0answers
14 views

DateTimePicker script and style missing?

I have a DateTimePicker Component in my Gutenberg Block. It seems, he's not correctly integrated : some styles are missing the zero of "05" minutes in the TextControl doesn't appear. Is there ...
0
votes
0answers
15 views

Gutenberg Block Toolbar - remove button

I want to remove all formatting buttons except H3 from the Gutenberg Heading Block. I’ve read through the Gutenberg Handbook and haven’t been able to figure this out yet. Some help would be greatly ...
0
votes
1answer
18 views

WP Gutenberg - custom block with two content fields

I'm developing Gutenberg custom block for accodrdions on my website. My code was working with only one content field. When I have added second props it has stop worked and console says: Cannot read ...
0
votes
0answers
8 views

Disable prepublish/fullscreen mode with filter

I would like to remove the option to enable the fullscreen mode and pre-publish check in Gutenberg. For my current project, there is no need for these features as I modified the editor quite a bit in ...
0
votes
0answers
14 views

Block Validation - Deprecated Functions for Blocks and how to use it

A developer and I created a Card Block for WP, which we used to create a page layout. After that page was created we wanted to add in a "rel" tag to the anchor tags. Which we did and we were served ...
1
vote
0answers
27 views

Wrap Gutenberg blocks both frontend/backend (PHP approach with ACF)

I'm currently running ACF 5.8 Beta 4 & WP 5.1 and I'd like to know if it's possible to wrap Gutenberg blocks in a parent div. For example, the following code allows to do precisely that and apply ...
0
votes
0answers
11 views

Load script after block is inserted

I have created a map block plugin that works more or less, but I'm having trouble understanding how to load the map script when/after the block is inserted. If I reload the page after inserting/saving,...
0
votes
0answers
16 views

Gutenberg editor in WordPress 5.0.3 /wp-json/wp/v2/pages/4713/autosaves?_locale=user 500 (Internal Server Error)

I recently upgraded WordPress from 4.3 version to 5.0.3 version. Now I am trying to add following code in to a page of a WordPress site in the Gutenberg editor. <!--[if lte IE 8]> <script ...
0
votes
0answers
13 views

WPML error prevents Gutenberg from saving

I get this error in the chrome console when trying to save or publish a post in WordPress 5.1.1 with WPML installed. When I click save the message "post published" comes up but then the buttons stay ...
0
votes
0answers
9 views

Need to embed Gutenberg editor in my plugin instead the Classic one

I have plugin which can send the letters to the different emails. In this plugin i have Classic Editor (TinyMCE) with which I can write letters. So, I need to embed Gutenberg editor in my plugin ...
0
votes
1answer
13 views

Different css rules for TinyMCE and Gutenberg while using add_editor_style()

I wanted to include some CSS rules inside of my gutenberg editor (in a way that it better reflected the frontend of the website). Yet I absolutely didn't want to see the same styles applied inside of ...
5
votes
0answers
60 views

How to hide specific Gutenberg blocks settings from users

There are any way to hide some Gutenberg block settings from users? Like " Crop images, Link To and Additional CSS class"
0
votes
1answer
14 views

How to link Gutenberg Gallery images To Media file automatically?

Really I'm gonna be crazy :(, After searching for two months no one talking about this issue!! I'm stuck with that!! I mange a multi writers blog, and all our users uploading gallery images, and ...
0
votes
1answer
44 views

Is there a hook or filter yet for Gutenberg Block Editor to not auto-add Noreferrer to links with a target?

Wordpress adds "noreferrer" to all links that open in a new tab. This started before Gutenberg and a TinyMCE filter was provided to fix it. This no longer works for Gutenberg. They have a new ...
0
votes
1answer
22 views

Wordpress 5.1 upgrade has lost the parent theme JavaScript

I have just upgraded from Wordpress 4.9 to 5.1, which obviously comes with Gutenberg. One major problem I have is that the parent theme (BeTheme) JavaScript is not being loaded and instead the child ...
1
vote
0answers
10 views

Modify Core Block Default Attributes

I have a client that wants images to automatically be centered. This used to be possible with the image_default_align option for the old editor. Is there a simple way to change the default attributes ...
0
votes
0answers
23 views

Add Shortcode inline inside Gutenberg block

In the legacy (classic editor) it was possible to add buttons to the editor toolbar via tinymce API, that will add shortcode at cursor. seems like this is not supported anymore from the tinymce FQA ...
0
votes
1answer
19 views

Multiple content areas with Gutenberg - Transparent areas mid content

I am trying to find a solution to a layout I have been tasked to build using 'Gutenberg' blocks. As far as I am aware there can only be one the_content(); per page. The layout I am trying to achieve ...
1
vote
3answers
55 views

Custom taxonomy terms not showing as list Gutenberg Editor

I have created a custom taxonomy that I have associated to my CPT. both appear on my dashboard, the issue is that when I add content and I want to choose a term from the list of the custom taxonomy, ...
2
votes
0answers
58 views

Transition from (classical) serialized custom meta field to (gutenberg) rest enabled meta

I have a custom meta box for saving values from two input fields into a single post meta field. The data is saved serialized in the DB: get_post_meta( $post->ID, '_custom_key', true ) will ...
0
votes
0answers
25 views

Images uploaded via Gutenberg image block are cropped

I'm trying to add images to a post with the following work flow using the Gutenberg editor on version 5.1. Add an image block -> select upload -> select image. The image is uploaded to the page and ...
0
votes
0answers
17 views

Gutenberg add style attribute using block filter

I'm trying to add a style attribute in the block editor to a block's wrapper using a block filter: const addStyle = createHigherOrderComponent( ( BlockListBlock ) => { return ( props ) => { ...
0
votes
0answers
29 views

Deprecating block markup [closed]

I created a block plugin and was recently asked by the client to update the markup in one of the blocks. I've read the Gutenberg handbook page about deprecating parts of the block. I tried this, but ...
1
vote
2answers
42 views

Gutenberg get block name

I'm using a filter in the Block API to add a class name to a block's wrapper. I have to add the class name to a specific block, not all blocks. I tried: const addClassName = ...
1
vote
1answer
39 views

Wordpress-gutenberg - Block validation: Expected text

I am building a gutenberg block plugin and I got stuck on simple two-field structure. The issue is that the save function works properly but something is wrong with the edit function. When I reload ...
0
votes
1answer
43 views

WP Query by Gutenberg block and get its attribute

I need to fetch on the front page youtube video from the latest post where was used gutenberg youtube block. I guess I need: 1) query such posts 2) extract the youtube URL from the block Is there ...
0
votes
0answers
20 views

change font in gutenberg

I have been looking for a way to change the font on a block by block basis within a Wordpress post using the 5.0 editor (Gutenberg). I have not found anything that works beyond changing the CSS. I ...
6
votes
1answer
44 views

Proper, exhaustive documentation for wp.editor etc

There exist the following : wp.editor.PanelColorSettings wp.editor.InspectorControls wp.editor.RichText wp.editor.BlockControls etc. Where is the documentation that shows the full list of available '...
0
votes
1answer
30 views

Gutenberg: Why doesn't the button core-component render on the frontend

I'm new to custom block development for the block editor and I came across a problem and couldn't find an answer anywhere. When I use a component from wp.components (in my case <Button /> in my ...
0
votes
1answer
28 views

Add custom html classes to gutenberg wrapper

I wanna add custom classes to gutenberg wrapper. But I wanna be flexible and use the classes from inspectorinput. How can I do? Block filters don't work a that cause you can just use a special class....
1
vote
0answers
61 views

How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table <td> elements?

I'm trying to allow users to paste (relatively) simple tables into Gutenberg. The editor converts the raw HTML fine but strips out any attributes/classes. For the most part this is good - I want to ...
0
votes
1answer
19 views

How do I make a savable preview like Youtube Gutenberg block?

The Youtube Gutenberg block makes you enter a Youtube Url, then shows the video... until you select it and select "edit" on the toolbar, see the url and change if you want. I understand the edit ...
0
votes
1answer
43 views

Gutenberg - Custom blocks not working as expected?

I am making my very first custom block in gutenburg editor using this tutorial. NOTE:- ALL THE CODE I HAVE WRITTEN IS INSIDE THE THEME NOT AS A PLUGIN And the output came correctly the block started ...
3
votes
1answer
61 views

What is the advantage of 'register_block_type' (the PHP function) when creating custom blocks?

I am currently registering custom blocks via javascript only. I am building a site with lots of custom layouts and widgets, and I'm using the new custom blocks of Gutenberg to facilitate content ...
0
votes
1answer
22 views

Guttenburg and Classic Editor - How to use the custom guttenburg block in classic editor?

I am making a theme, in that I have created some custom blocks for guttenburg but the problem is how the user can use the guttenburg blocks if he/she switches to classic editor. For an example, Let ...
0
votes
1answer
24 views

Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”

I have modified the tutorial at https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/plugin-sidebar-0/ to meet ES6+ but I am having trouble getting it to actually save to ...
0
votes
1answer
35 views

Save/update post_meta with Gutenberg from the panel

I've created a block, and I need to save as post_meta a value from an action on the panel. Php side: add_action( 'init', 'yasr_gutenberg_show_in_rest_overall_meta' ); function ...
0
votes
0answers
22 views

Is it possible to add gallery image instead of the post feature image in the Gutenberg editor when I'll setting this post format is gallery?

I want to add gallery images (WP new editor Gutenberg) in the post instead of the post feature image and It will be set when I'll set this post format is the gallery. Thank you.
1
vote
1answer
53 views

Add a containing DIV to core Gutenberg blocks

The design I am working with calls for each Gutenberg block to have a coloured background (white in this case) with max-width: 1160px and the content within to have max-width: 800px and centered. ...
1
vote
1answer
38 views

Import external data into post using custom Gutenberg block

I've created a simple Gutenberg block that displays the transcript of an externally-hosted video. When creating a new WP post, the author enters the ID of a video in the block's editor section. This ...
0
votes
1answer
27 views

transition_post_status hook doesn't have any POST data when publish with Gutenberg [closed]

Describe the bug When placing a hook on transition_post_status I can see it fired but no POST data is available, to get that post data I have to use the save_post hook which is inconvenient since I ...
3
votes
2answers
104 views

Set Post Title to Read-only and Disable Permalink Slug Editor in Gutenberg

When using Gutenberg I would like to disable all users except administrator from being able to edit a post's title even though I want to allow them to edit the post, and I would like to disable the ...
0
votes
1answer
30 views

How to get access the ID of all posts of custom post type in Gutenberg editor

I want to access the IDs of all posts of custom post type book in my custom gutenberg block voucher and then render them in option list on admin side. What i want to achieve is when i click on voucher ...
0
votes
1answer
34 views

Override theme style rule in Gutenberg

I have a theme that adds the following CSS rule inline through the Customizer to style the hover state of links in post content: .entry-content a:hover { color: <color selected in the ...
0
votes
1answer
17 views

Custom Blocks as part of a theme

I'm new to wordpress, but I'm a pretty competent developer. I'm trying to nail down what my client can do to their site. My idea was to create some special 'blocks' for them, which provide the page ...
2
votes
0answers
37 views

srcset attribute in Gutenberg gallery blocks

Gallery block are very useful to layout thumbnails. However, when I choose a columns layout (for example, four columns layout), the srcset for this thumbnail remains the same as a large image. In ...
0
votes
1answer
20 views

Remove formatting in rich text with Gutenbergs Block editor

In the classic editor, an option for removing all formatting in a selected text was possible in the visual tab. Is there such a function for Gutenberg? If not, is it planned at some point? What ...
0
votes
1answer
40 views

Get the current block ID

Is there a way to get the current block id? I would like to add it in the html generated in the save function (registerBlockType). The save portion of my block: save: props => { const { ...
0
votes
0answers
24 views

My Webpack setting for Gutenberg doesn't work

I started making custom gutenberg block and am trying to setup the environment but never work... Webpack always throws error like "Unexpected token", which says JSX Compiling. Here are testing files....