I managed to find an answer to this. Instead of adding an event listener to the editor, I hooked some additional functionality onto Gutenberg’s Autocompleter instead:
I wrote a post here detailing how I did this, if anyone is looking to do the same thing: https://blog.terresquall.com/2023/06/how-i-made-double-dashes-automatically-convert-to-em-dashes-in-wordpress-gutenberg-editor/
Related Posts:
- What is the standard way to use the version of React that ships with Gutenberg on the front end?
- How can I render a built-in Gutenberg block with InnerBlocks outside of the block editor?
- What is the proper way of using React Hooks in Gutenberg on frontend?
- How to dynamically add style tags to Gutenberg editor in react
- How to implement Mapbox GL JS with a custom Gutenberg block in FSE?
- Removing Default Panels From Gutenberg Document Setting Panel (sidebar)
- Gutenberg Dev – React Context.Provider returns undefined
- Avoid automatic scroll jump when dragging a resize handle in a Gutenberg block
- Implementation of React-Datepicker component with Gutenberg in WordPress
- How can i extend the existing Block Inspector Tabs in WordPress Gutenberg Editor?
- Get realtime title and featured image value in WordPress block
- How to get block editor block inspector attribute value in my react block
- gutenberg block – how to force update after attribute changed?
- How can I add a custom attribute to Gutenberg core blocks?
- Add additional classes to gutenberg .editor-styles-wrapper
- How to use the WordPress < LinkControl /> Component
- Add PHP block template to content using wp_insert_post
- Gutenberg reusable blocks – is it possible to customise an instance?
- Gutenberg Block manipulation: Undo parse_blocks() with serialize_blocks() results in unicode issues
- How to use “getEntityRecords” for user data?
- Gutenberg: Restrict Top Level Blocks, But Not Child Blocks
- Get a WordPress Gutenberg Block Attribute to use it in frontend
- Rename reusable blocks shown in navigator
- How to troubleshoot a custom Gutenberg block error: “This block has encountered an error and cannot be previewed”
- Two Gutenberg components sharing the same Panel Body in Inspector Controls
- How to learn Gutenberg block development [closed]
- Unable to disable Gutenberg with plugin Classic Editor or Disable Gutenberg
- Gutenberg Block Development: Trying to add custom js script to npm start command by modifying webpack.config
- Popover in a LinkControl style
- Is there any way to render the WordPress Gutenberg core/embed block in PHP by passing in the URL?
- How to use in Block Editor – react-bootstrap?
- Double container elements on custom block in editor
- How to target block variations with has_block()?
- How to add extra option to WP core gallery block?
- Can I jump over a InnerBlocks component to target content inside with react-flickity-component?
- Use a React Component in conjunction with Blocks
- Make a custom block like default paragraph block, so that Enter starts a new block
- Custom gutenberg block not rendering with styles on frontend
- Gutenberg Block on Second Edit fails validation
- Import setAttributes() method in a separated module
- Add a hyperlink to a group block?
- How to change Block Controls Icon in Gutenberg?
- Add multiple images to a custom block
- How do I disable the block marketplace for Editors?
- How to use __experimentalCaptureChildToolbar
- Why is wordpress suddenly stripping away all newline characters and how to disable this?
- Gutenberg RadioControl saving data but not not selecting radio
- Gutenberg on block move
- Gutenberg template lock but add/delete blocks programmatically
- Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]
- How can I make Gutenberg block layout switchable without lost of current content?
- code block does not show in excerpt
- Is it possibe to prepend “ with icons or text?
- How to create Gutenberg’s pattern category automatically with custom post taxonomy terms?
- How to Change the Gutenberg editor’s colors?
- Debugging Gutenberg block with the React Profiler (React Developer Tools)
- Modify core/image block by adding inner span to figcaption in save
- How to override a function in the wp_includes folder(block supports/colors.php)
- If is block name
- Is there a way to grab the current value of the editor in Gutenburg/Classic WordPress editor? (Not the saved value of the post!)
- Can I add custom code to gutenberg auto save?
- Changing block quote size in gutenberg
- How to get the revisions feature back on the classic editor?
- how to use a Text component in javascript?
- How to nest a list inside a blockquote using the Gutenberg block-editor?
- Is there an obvious error in this React code for customizing a Gutenberg Block?
- Two content editors (gutenberg blocks) on the same page
- Expose Gutenberg blocks in Post Revisions API endpoint
- How to wrap Gutenberg blocks into a custom container (without using HTML blocks)?
- DateTimePicker script and style missing?
- How to remove multiple blocks of Gutenberg at the same time?
- How to set the background color of a template part (Header/Footer) in Twenty Twentythree?
- Run callback on removeBlock action
- Gutenberg blocks – only allow as innerblock
- Pullquote Block Styles disappeared?
- Using useSelect creates “minified React error”
- How do I reinstate the “Add Block” feature that changes with the update?
- How to use react in frontend of dynamic blocks?
- How to use isSavingNonPostEntityChanges in the same scope correctly?
- Attempting to specify viewScript, in a custom block, results in a register_block_script_handle error
- Restricting core block nested blocks
- Is is possible to use Templates with blockprops?
- How to add readable name and description to templates?
- Errror generated in console leading to block validation failer
- Add Custom Block Supports to Core Block
- Block validation failed – save content vs post body content
- How to propegate changes from block render_callback to other blocks using that callback?
- wordpress 6.2 is alignfull and lignwide removed?
- How to add “rel=nofollow” for links in latest version of WordPress?
- I can’t highlight/select text in the RichText components in my Gutenberg blocks
- Lazy load video block while keeping autoplay
- Use a custom block inside another custom block
- Controlling or disabling Gutenberg editor panning/focus on a custom slider block
- Event when Modal is opened/visible
- Default value for highorder component in Gutenbrg?
- Custom gutenberg block: window.wp.blockEditor returns undefined
- How can I add a wrapper class to individual blocks inside of an InnerBlocks component?
- how can I remove all default settings in Gutenberg blocks? example core/button
- How do i create a switch for responsive devices?
- wordpress 6.4.2 gutenberg custom block array attributes saving problem?