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
15 views

White Screen Instead of Gutenberg Editor. Possible Theme Conflict?

I'm running wp 5.1 on my website and I have my own theme (built from scratch). The problem is, I can only use Gutenberg when I use "Twentynineteen" default theme. It works fine with that theme, but ...
0
votes
0answers
16 views

How to integrate plugins into block editor

I have implemented some plugins, that are all based on adding shortcodes. At the end, the plugin renders directly HTML code, including needed JavaScript. I would like to add now the possibility to ...
0
votes
0answers
19 views

When editing in block editor, the post/article gets under the floating widgets

When editing in block editor, the post/article gets under the floating widgets and I am not able to edit that portion of the article which is behind the widget inside block editor. I am attaching a ...
1
vote
2answers
60 views

Wrap gutenberg block ‘div’ in other elements/extra HTML

I’m trying to add HTML wrappers around a block to create a clipping effect, something like the below code. It has been suggested this might be possible with the block save or block edit functions? I ...
1
vote
1answer
40 views

Gutenberg; Rich Text/HTML for Metadata Textarea Control in Back End

I've properly registered a Gutenberg block that consists of a textarea control to store metadata for a post. In the old days, I simply rendered a wp_editor on the edit-form-advanced hook which had ...
0
votes
0answers
13 views

Save custom css class (and data) to core/columns block

I wish to add/change class for this div: <div class="wp-block-columns has-2-columns"> There is no possibly to use "wp.blocks.registerBlockStyle" because it doesn't work for core/columns blocks ...
-1
votes
0answers
17 views

How to set text size to LARGE sitewide in Gutenberg

I've got a Storybook site using a font sitewide which looks best at LARGE size in The Gutenberg paragraph options. How can I have Gutenberg automatically set the font size to LARGE across all posts? ...
0
votes
0answers
10 views

Open MediaUpload from external component in Gutenberg

Gutenberg has MediaUpload component that allows selecting images from media library (its docs). It allows to pass button to a render property, for example: <MediaUpload onSelect={ ( media ) =&...
0
votes
1answer
10 views

Looking for a javascript callback action to re-initiate a custom slideshow in gutenberg

I'm using the new Gutenberg Blocks in ACF to build a custom slider, but I need a way to re-initiate BXSlider(the library I'm using for the slider) after every change made on the block. I'm looking in ...
1
vote
0answers
19 views

How can I dynamically wrap <InnerBlocks /> in a Gutenberg block?

I have created a custom list block that should behave just like the core one, but instead of handling the list items itself, it abstracts that responsability to inner listItem blocks. I want wrap the &...
1
vote
1answer
45 views

How to get “Additional CSS Class” for ACF Gutenberg block

I have registered a custom block with ACFs acf_register_block. I have set a render_callback to load a php template but would like to access any extra CSS classes which the user may have set in the ...
1
vote
1answer
20 views

I can't choose the custom taxonomy in my custom post type on Gutenberg

I'm new here and in Wordpress Development. I have a custom post type that works with a custom taxonomy. In the classic editor, I can choose the category or add new if I want, but when I'm on ...
4
votes
1answer
64 views

Set fullscreen mode by default

The block editor has a Fullscreen mode which you can access via the tools options on the top-right: Is there a PHP approach to enable the Fullscreen mode by default? As in, force this mode for all ...
2
votes
1answer
26 views

Gutenberg Custom Block

I am trying to create a custom block for Gutenberg. So I tried something simple as this: JS File: var el = wp.element.createElement; wp.blocks.registerBlockType('test/blocks', { title: 'Test ...
2
votes
0answers
22 views

add_meta_boxes action with refresh on save

I've created a meta box using add_meta_boxes action and it works when I open any post to edit it. add_action('add_meta_boxes', function() { add_meta_box( ... ); }); When WP auto ...
1
vote
1answer
40 views

How to use wp.hooks.addAction() in React JS/Gutenberg?

I am able to successfully use wp.hooks.applyFilters() and wp.hooks.addFilter(), but I'm not able to render a React Component using wp.hooks.addAction(). However, the console.log() runs just fine ...
1
vote
0answers
23 views

Gutenberg Block on Second Edit fails validation

Currently I'm creating a list of components for a InnerBlock blockItems = tabItems.map(function(item, index) { return ['test/tab', {borderRadius: borderRadius, blockParentID: clientId, ...
0
votes
0answers
13 views

Gutenberg extend core file block - Add img tag before file name from a hook

There is a hook to extend a core block with filters and add style to a block. function addBackgroundColorStyle( props ) { return lodash.assign( props, { style: { backgroundColor: 'red' } } ); } wp....
0
votes
1answer
20 views

How to Disable Gutenberg & Return to the Classic WordPress Editor Without any Plugins

for disabling gutenberg editor I use the below code add_filter('use_block_editor_for_post', '__return_false'); but it just disable gutenberg and Classic editor never come back. I am just curious is ...
0
votes
1answer
13 views

Block content rendering on the top just below body tag

I am trying to create a gutenberg block with server-side rendering. The problem is the block renders in the top left instead. In the frontend, it displays as expected. const { __ } = wp.i18n; const { ...
0
votes
0answers
9 views

Object type for block Attribute (Gutenberg)

Is there support for type object for block attributes?? Thanks.
0
votes
1answer
20 views

How to override Gutenberg admin CSS

I need advice how to modify Gutenberg's core CSS. What's my problem: the outlines and block labels disappear and I want them fixed, visible on every block all the time, not only in focus. I've found ...
1
vote
1answer
24 views

Passing select control value to block

I have created a gutenberg block and a select control that has some class names. The select control is in its own panel in the sidebar. My issue is when I try to call the select controls value/size. ...
0
votes
0answers
28 views

Gutenberg remove Most Used group

I was searching for a solution to remove the "Most Used" group of blocks from Gutenberg editor and couldn't find any, is there any way?
0
votes
1answer
5 views

Gutenberg internal page link search box

I'm trying to create a field or a select box in a WordPress custom block where the user can select a page and store it's ID or URL like the default internal linking field works. The only difference ...
0
votes
0answers
20 views

Import setAttributes() method in a separated module

Is there a possibility to import the setAttributes() method in a separated module, I mean in what package we can find that method outside the props of edit and save functions Example: This is a ...
0
votes
0answers
41 views

Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?

I want to make some page layouts with the Gutenberg page builder so I can reuse them as sort of page templates. An example: banner image on top of the page main title under the banner 3 rows with ...
0
votes
0answers
17 views

How to enable sticky post for custom post type with enabled Gutenberg editor?

I was using https://wordpress.org/plugins/custom-post-type-sticky/ for enable sticky post for custom post types. But it doesn't work with new Gutenberg editor. Is there any easy way how to make it ...
0
votes
1answer
42 views

Pre-set CSS class into custom block/template

I am trying & learning to build custom block/template for Gutenberg and would like to "pre-set" CSS class for some specific block. Is it possible to add it like below? Refer: [Template and Block][...
-1
votes
1answer
22 views

How to remove multiple blocks of Gutenberg at the same time?

Currently, I have to remove one block per time. How to remove multiple blocks of Gutenberg at the same time?
0
votes
0answers
25 views

Only 10 of 233 categories selectable when adding a new post

In WordPress 5.1.1 in the new block editor. I have 233 categories in the backend, but when adding a new post from backend then it's showing only 10 categories: How can I make all categories showing ...
0
votes
0answers
15 views

I am not receiving className in a ServerSideRender component

I'm trying to render a block from PHP with ServerSideRender as follows: js file: /** * WordPress dependencies */ const { __ } = wp.i18n; const { registerBlockType } = wp.blocks; const { ...
0
votes
1answer
31 views

Gutenberg sidebar example does not update meta field in the database

Gutenberg example for creating sidebar https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/plugin-sidebar-0/ does not keep what is entered in the box. After refreshing ...
3
votes
2answers
32 views

Show missing Sidebar from Gutenberg admin area

I hid the custom sidebar from Wordpress example https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/plugin-sidebar-0/ by pressing remove from toolbar star in the panel. ...
0
votes
0answers
22 views

Gutenberg enqueue script error

I'm trying to link all images/gallery to be automatically linked to "media" but I always get a error as below What I did wrong, and how can I fix it. I'm highly appreciated your help. enqueue ...
-1
votes
0answers
28 views

The editor has encountered an unexpected error (Invariant violation) - Advanced Gutenberg Blocks

I am trying to add a product block within a post using Advanced Gutenberg Blocks but the editor is crashing every time. Steps to reproduce the error: I add a product block I search for a product, the ...
3
votes
1answer
32 views

Looking for all available options of Gutenberg Block

I am trying & learning to build custom block for Gutenberg but spent a few hours on searching for full list of "available options". Maybe I was overlook... Refer: Template and Block For example, ...
5
votes
1answer
52 views

Blocks: set a default value for a TextControl

I'm creating a block similar to the WP Core Table block, which first presents the user with a form to set the number of rows and columns. I'd like to set a default value in the TextControl for the ...
1
vote
0answers
11 views

TinyMCE Editor as component in Gutenberg Block

I'm trying to set up a custom block that uses a TinyMCE as the text editable component, rather than using RichEditor. I can't find anything that really details how to go about this and need pointing ...
1
vote
1answer
22 views

How can I add arbitrary `data-` attributes to a block's `edit()` container?

For example: Before: <div id="block-fc502ca9-0d7b-440c-959c-3da152db0192" class="wp-block editor-block-list__block" data-type="wordcamp/schedule"> After: <div id="block-fc502ca9-0d7b-440c-...
0
votes
0answers
18 views

Wordpress/Gutenberg Toggle Saving, But Not Changing

I've been struggling to get my head around the new Gutenberg way of using React javascript to create a sidebar toggle. I have the text field saving and storing fine, and I have the checkbox itself ...
0
votes
1answer
37 views

find out reason of “Updating failed” in Post-editor

In some cases, if there is issue in code or whatever, and try to update the post in Gutenberg post-editor, you will get "Updating failed" error message: Is there any way to debug/find out the reason (...
0
votes
0answers
28 views

extra comma is appearing after shortcode attribute while creating custom gutenberg block

I have created a Gutenberg block which returns shortcode in RawHtml component but while returning dynamic shortcode in edit() function it gives extra commas appending in the shortcode, can anyone ...
2
votes
1answer
23 views

Create custom tab in WordPress 5 media upload

Can someone help me create custom tab in WordPress media library. With WordPress version 4 i used to media_upload_tabs function to build that nice work. But now, in WordPress version 5 the function is ...
0
votes
0answers
39 views

Gutenberg Array push

I'm trying to push to an array some values from a select box, when clicking a button but I get this error. Uncaught TypeError: Cannot read property 'push' of undefined My code for the button is el(...
0
votes
0answers
19 views

Default style of a button in WordPress Gutenberg

I'm trying to change the default style of a button with the following code: <InnerBlocks template={ [ [ 'core/button', { text: __( 'Add text', 'xf' ), className: 'is-...
0
votes
1answer
16 views

Customizing the CSS for the post/page editor?

As you can see from the cropped screenshot below, where I have an HD widescreen monitor, I have a very narrow editing box to create or edit posts or web pages. I have found that the title block's CSS ...
11
votes
2answers
702 views

Deactivate Gutenberg tips forever - not Gutenberg

I like Gutenberg a lot, however, the tips at the beginning of each page load drives me mad. I would like to disable the nagging tips forever and ever via code. Please don't post "Disable Gutenberg" ...
0
votes
0answers
22 views

Creating Gutenberg Block with ACF programmatically

I am trying to make Gutenberg blocks using the beta version of ACF which provides support for it. I am able to do so with the GUI (as shown first) but cannot do so programmatically. In the functions....
0
votes
0answers
21 views

There is a problem in the gutenberg block I developed. Problem is with withInstanceId

I can get a unique id withInstanceId , but I get a bug like this on my block in dev console. Expected: <div id="deneme-carousel-1" class="owl-carousel owl-theme"></div><script>...