You probably shouldn’t use jQuery
with gutenberg block-editor. Instead, use api access like:
wp.data.select("core").XXXXXXX()
wp.data.select("core/editor").XXXXXXX()
where you should replace xxx
with desired functions. You can list them with console.log(wp.blocks.getBlockTypes());
while on block-editor page.
Related Posts:
- ajaxurl not defined on front end
- Why does WordPress use outdated jQuery v1.12.4?
- How to add a javascript snippet to the footer that requires jQuery
- How to include jQuery and JavaScript files correctly?
- check if Gutenberg is currently in use
- How Do I Use jQuery UI In My Plugin
- How to use PanelColorSettings in custom Gutenberg block?
- Remove profile picture option (and other things) from profile.php (in admin)
- Custom action button in Gutenberg editor (post_submitbox_misc_actions – equivalent)
- Test to see if jQuery or Prototype is queued by another plugin?
- jQuery in header or footer
- Hook the Keydown Event in the TinyMCE Post Editor
- Adding pre-publish checks with Gutenberg
- Managing two editable fields in gutenberg
- How to make repeated component/block in Gutenberg
- How to save block attributes when the output doesn’t change
- How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
- Using Primary Color in Plugin Block
- Gutenberg ServerSideRender is deprecated, how to work with new wp.serverSideRender component?
- Add a jQuery function to admin pages
- How to Add a .js file Only in one specific Page Dynamically to Head
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- lodash dependency in a Gutenberg plugin
- Help adding image upload functionality to widget
- How to trap “Publish” button to check for meta box validation?
- Create Element From Dynamic HTML String [closed]
- Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”
- Use js script from one plugin in another plugin
- creating elements/innerblocks via rangecontrol
- What’s the Right Way to get and save remote data for a Gutenberg block?
- Using Ajax call in jQuery doesn’t work in widget
- WordPress: After Gutenberg plugin migration to block.json the localization/ translations with PolyGlot in JavaScript does not work anymore
- Looking for callback function after Gutenberg is rendered?
- wp_enqueue_style built in styles
- How to Parse an Array of Elements in Gutenberg Block
- What is the difference between these two methods of writing $ instead of jQuery in WordPress [closed]
- Admin-ajax.php appending a status code to ajax response
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- Plugin admin page meta_box toggle and order state not saving
- WordPress plugin options and jQuery
- Using the component outside the editor. select(‘core’) is null
- Gutenberg is there a way to know if the current block is reusable?
- How to disable “Transform to” option in Gutenberg custom blocks
- How to allow core Gutenberg blocks selection only when you are inside a custom inner block
- Is there a better way to implement responsive images than what WordPress uses by default?
- Gutenberg registerFormatType with Multiple Classes
- Ajax in WordPress – path issue
- Saving data from block editor to the database
- Gutenberg: useDispatch is not a function – @wordpress/data included
- Gutenberg Block add element in the Editor inside InnerBlocks after div – editor-block-list
- Make a list with header and subtext in Gutenberg blocks
- Gutenberg – What is the best way to save/update post meta?
- How to access Elementor-navigation-elements via jQuery
- Insert meta-description into Yoast-SEO input-field via JavaScript
- Adding a navigation with wp_nav_menu() to a custom block in the site editor
- Why isn’t custom sidebar panel not showing up in the Gutenberg Editor?
- REST API error in block editor for custom templates
- Reinitiate Gutenburg’s blocks using javascript
- How can I include React useState in a custom gutenberg block plugin?
- Remove Gutenberg Buttons Block
- Set srcset on a block image
- Insert text programmatically in WordPress Gutenberg Editor
- Translations not making it into Block UI but work in the rest of the plugin
- Javascript function defined in view.js not reachable from save.js
- How to move custom gutenberg block controls from settings to styles tab?
- How can I obtain an option (get_option) inside a block viewScript?
- WordPress 6.6.1 – Trying to make a block but receive error, “! Cannot read property ‘then’ of undefined”
- How to use useSelect to retrieve the currently default fontFamily?
- Event when Modal is opened/visible
- Template locked block does not show appender
- move useState variable from edit.js to save.js. How do I do that?
- Multiple php files in dynamic gutenberg block
- Access DOM Element in Gutenberg Block on WP Admin Post Edit Screen
- My WordPress plugin don’t show the button on Gutenberg
- Gutenberg InnerBlocks noallowedblocks on parent but allowedblock on Child
- Warning: Cannot update a component (`Unknown`) while rendering a different component
- WordPress Media Uploader not displaying image that has just been uploaded
- Custom Gutenberg Block ‘Stylized List’ – Incorrect Rendering and Looping of List Items
- Rebuild Core Block as Separate Plugin
- Cannot call a class as a function in block plugin react component
- How to detect when the user clicks the publish/update button in Gutenberg Editor
- Block Editor: Filter getSaveElement and innerBlocks
- Gutenberg Static blocks: viewScript doesn’t import css for frontend?
- useBlockProps() nests wrapper with class name inside block wrapper in the editor
- Using @wordpress/scripts 28.x with WordPress
- Gutenberg move post/page title to Editor sidebar document panel
- Custom Gutenberg block with nested InnerBlocks renderAppender not displaying add button
- configure additonal build files in the @wordpress/create-block
- Is It Possible to Use the Block Editor’s Notification Feature to Send Another Notification After the Post Is Saved?
- Output HTML Tags In Gutenberg Block
- Can you nest columns/column in a gutenberg custom template?
- Can we write custom DOM manipulation inside edit.js file while developing custom Gutenberg block?
- User set default settings for a Block in Site Editor
- Attributes array not saving values
- Can’t get hexcode as color settings on save.js file, although I can on edit.js
- how to include an image in the build of a multi block plugin
- WordPress Block with Interactivity API e Preact Component
- Ways to reduce code duplication when creating custom blocks
- Insert Button in to the Block Editor (Header) Toolbar
- render_block_context filter and block context inheritance