Gutenberg is the new editor for WordPress.com, which offers more features and a cleaner interface than previous versions of WordPress. However, many users are not happy with Gutenberg because it’s much harder to copy blocks from Gutenberg in plain text format as opposed to within the post editing screens that most plugins use. This tutorial will show you how to do just that!.
The “wordpress copy and paste blocks” is a process that allows users to copy and paste Gutenberg blocks in plain text.
Unlike the Classic editor, the Gutenberg editor does not allow you to copy all of the information in plain text. When many blocks are inserted in a plain text editor like Notepad, the HTML markup is included instead.
The only time this rule does not apply is when copying individual blocks. The HTML tags aren’t used in this scenario. It is, however, impractical to replicate many blocks one at a time.
The idea for this, according to a GitHub bug relating to this behavior, is to enable copying material across posts without destroying block information.
This makes great sense for individuals who usually use the block editor to write their articles, but it’s illogical for those who modify their posts using other editors that don’t produce HTML.
It would be ideal if users could choose between the HTML and plain text copier as their default copying behavior. As a result, all users have access to the finest of both worlds and may smoothly transition between them whenever the need arises.
While we wait for a compromise in that direction, here are a few of solutions for copying the blocks in plain text alone.
Use a Temporary Classic Block as a first step.
The traditional block functions similarly to the classic editor. This implies you may temporarily utilize the block to create a plain text copy while still using the Gutenberg Editor. To do so, follow these steps:
- At the bottom of the post, make a traditional block.
- Copy all of the paragraphs or blocks that need to be copied.
- Copy the material and paste it into the traditional block.
- To use your plain text editor, copy the material from the traditional block.
- Delete the traditional block.
2. Make Use of a Word Processing Program
Word processors like Microsoft Word and Google Docs, unlike basic or rich text editors, can produce HTML.
As a result, when you paste anything from Gutenberg into them, all of the copied content will be formatted the same way it was in the editor, not just the text. Copying material from a Word Processor to a plain text editor, on the other hand, will not preserve the underlying markup.
As a result, we can utilize this to convert the HTML copy to plain text as follows:
- Take the material from the Gutenberg Editor and paste it into your document.
- Use Word, LibreOffice Writer, or Google Docs to paste it in.
- Copy the text from your Word Processor into your Plain Text Editor.
I’ve only tried those three CPUs, but I’m certain that others will perform similarly.
3. Use Regular Expressions to Find and Replace
If you use a text editor that supports RegEx, like Notepad++ or Sublime Text, you can immediately remove all of the Gutenberg HTML elements using the following expression:
- The blocks should be copied and pasted into the text editor.
- Place the cursor at the start of the sentence.
- The Find and Replace window or panel should now be open.
- Allow regular expressions to be searched.
- In the Find what box, type [>]+> and leave the Replace with box blank.
- All of the matches should be replaced.
The HTML tags, as well as anything included inside them, will be eliminated, leaving just the text content.
Using an Online Service to Remove HTML
Many internet tools, such as wtools and StripHTML, may assist you in removing tags from any HTML code.
Simply copy the blocks and paste the code into one of the tools, where the tags will be stripped. The raw text may then be pasted into your plain text editor.
The “wordpress text formatting problems” is a problem that many WordPress users have been experiencing. In this article, I will show you how to copy Gutenberg blocks in plain text.
Frequently Asked Questions
How do I copy and paste a Gutenberg block?
A: This is not something that the bot can do. The only way to obtain a Gutenberg block would be by making a page on your own, and then copying/pasting it back into this chat.
How do I copy and paste a block in WordPress?
A: If you are trying to copy and paste a block of text in WordPress, try using the shortcut Ctrl + C or Command-C on Mac. You can also use Edit > Copy (Command-C) for Windows users.
How do I export Gutenberg blocks?
A: To export the block to an image file, click on the cog in the upper right hand corner. Clicking on this will open up a menu that has options for importing and exporting.
- wordpress keep source formatting
- wordpress copy content from one page to another
- wordpress duplicate block
- gutenberg block options
- copy paste image wordpress