Pasting from Google Docs loses paragraph alignment/indentation
Description
Description of the bug
When pasting content from Google Docs into the WordPress editor, headings are detected correctly and inline styles/links (bold, italics) are preserved, but paragraph alignment and indentation are lost.
Expected
- Preserve headings, inline styles (bold/italic), links, and paragraph alignment and indentation.
Actual
- ✅ Headings recognized correctly
- ✅ Bold/Italic preserved
- ✅ Links preserved
- ⚠️ Alignment/indentation not preserved (content loses indentation and alignment)
Step-by-step reproduction instructions
Step-by-step reproduction instructions
- In Google Docs, create a doc with paragraphs with left/center/right alignment and differing indentation.
- Select all → Copy.
- Paste into a new post in the WordPress editor (test in both Chrome and Firefox).
- Compare formatting fidelity with paragraph alignment/indentation.
Screenshots, screen recording, code snippet
Video: https://cloudup.com/c7YnR9wucFs
Environment info
Environment info
- WordPress: 6.8.2
- Theme: Twenty Twenty-Four 1.3
- Plugins: none
- OS: macOS Sequoia 15.6
-
Browsers:
- Chrome 138.0.7204.184 (arm64)
- Firefox 141.0 (Build ID 20250717180000)
- Server (FYI): PHP 8.3.24 (FPM), nginx, MariaDB 11.4.7, WP_DEBUG=true
Please confirm that you have searched existing issues in the repo.
- [x] Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- [x] Yes
Please confirm which theme type you used for testing.
- [x] Block
- [ ] Classic
- [ ] Hybrid (e.g. classic with theme.json)
- [ ] Not sure
I was able to reproduce this issue.
Gutenberg: 21.4.0 Browser: Chrome OS: Mac OS / Windows 11
I'm not quite sure if we should do this, the default paste handler is meant to only paste semantic elements and strip all styling (which is often unwanted garbage). Perhaps we could offer some alternative paste preserves all styling such as alignment, colors, padding, etc. but I don't think it belongs in the main paste functionality.