WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.32k stars 4.12k forks source link

Text expander apps replace block content on the Classic Block (inline) #64717

Open jartes opened 3 weeks ago

jartes commented 3 weeks ago

Description

Quick summary

When using a text expander software or in the Classic block, the block itself is removed and the text that is inserted using the text expander is added through a Paragraph block.

This is only happening when using the inline Classic Block:

Markup on 2024-08-22 at 15:10:56

This works fine when using the pop-up Classic Block (which is displayed this way when the Custom Fields appearance option is off):

Markup on 2024-08-22 at 15:12:28

What actually happened

The entire Classic block (and text already added to the block) is removed. The text inserted using the text expander app is added as a Paragraph block.

It could be related to https://github.com/WordPress/gutenberg/issues/61377

Step-by-step reproduction instructions

  1. Create a new post or page.
  2. Make sure you don't have the Custom Fields appearance settings
  3. Add a Classic block.
  4. Write a few sentences/words inside the block.
  5. Insert a line using a text expander app, like "Text Expander" or "TypeIt4Me".
  6. Check what happens.

Screenshots, screen recording, code snippet

https://github.com/user-attachments/assets/ab5b5806-8579-47b8-93ce-32db74847b45

Environment info

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

miminari commented 2 weeks ago

I could be reproduced this. I used TypeIt4Me.

Environment info WordPress 6.6.1 Gutenberg 19.0.0 Twenty Twenty-Four: 1.2 Safari 17.1.2 and Chromium Engine Version 126.0.6478.127 on macOS 12.5.1

t-hamano commented 2 weeks ago

This issue may not fundamentally be a problem with the text expansion app.

There have been reports of issues with non-modal classic blocks where text pasted from outside WordPress gets converted to a paragraph block: