Rules for pasting large text to Gutenberg / WordPress

Here’s the rule of thumb:

  1. Gutenberg changes pasted large text into separate blocks, if you have two line separation between paragraphs,
  2. 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:

  1. Hit Ctrl+H to open Replace dialog.
  2. Use \r\n as Find what and \r\n\r\n as Replace with.
  3. Make sure that Extended (\n, \r, \t, \0, \x…) is selected in Search Mode.
  4. Consider checking Wrap around as well.
  5. Click Replace All or Replace All in All Opened Documents, if you have more of them opened.

It would look something like that:

Turning one line paragraph separators into two line ones in Notepad++

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! :)

One comment on “Rules for pasting large text to Gutenberg / WordPress

  1. Steve

    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!

Leave a Reply