Rules for pasting large text to Gutenberg / WordPress
Here’s the rule of thumb:
- Gutenberg changes pasted large text into separate blocks, if you have two line separation between paragraphs,
- If you have single line paragraph separation then Gutenberg will paste whole text into single block.
If you’re pasting from Word or other rich editor then everything should be OK. But, if you’re pasting from some non-rich text editor (I am using Notepad++) and you have a single line paragraph separation then a short trick must be done prior pasting text to Gutenberg.
You simply must add these missing two line paragraph separators, by changing single ones to doubles:
- Hit Ctrl+H to open Replace dialog.
- Use
\r\n
as Find what and\r\n\r\n
as Replace with. - Make sure that Extended (\n, \r, \t, \0, \x…) is selected in Search Mode.
- Consider checking Wrap around as well.
- Click Replace All or Replace All in All Opened Documents, if you have more of them opened.
It would look something like that:
That’s all folks…
At least for this. Because if, for any reason you paste text — as I do:
- not directly from Word to Gutenberg, but
- from Word to Notepad++ (to strip all formatting) and then from Notepad++ to Gutenberg instead,
then either:
- turn off auto words pagination feature in Word prior first copy-paste or
- replace those pesky chacters that Words ads in this case with the very similar way as above.
That means:
The problem is that Word is using a special dash-character that can’t be easily typed from the keyboard (in Find what field). I usually paste it from text.
Now, it is really over! :)
An easier way is to use the classic editor and paste HTML from Notepad in code view then switch to block editor and convert to block ;-) The Gutenberg editor certainly needs more work, I can’t even find how to use block quote!