Common
Getting Started
Updates
Writing & Editing
Categories & Taxonomies
Editor Blocks
How To’s
Features
Translations
JetPack
3rd Party API
Troubleshooting
Development
About The Theme

Preformatted Block

The preformatted block is usually used to display the entered text in a post or page unstyled as you type.

To add an preformatted block, click on the Add Block button and select the Preformatted block. Alternatively, you can start typing /preformatted in a new paragraph block, then press enter.

Use the slash command /preformatted to insert a preformatted block

Detailed instructions on adding blocks can be found here.

Block Interface

To reveal the block toolbar, you can click on the block and the toolbar will display. Each block comes with unique toolbar icons and specific user controls that allow you to manipulate the block right in the editor.

The preformatted block toolbar has basic text formatting options

The preformatted block offers basic formatting options in its toolbar:

  • Bold

  • Italics

  • Hyperlink

  • Strikethrough

Block Usage

The preformatted block shares a lot of similarities with the paragraph block and the code block. Think of it as a hybrid of the two.

Similar to the code block, the preformatted block is displayed in a monospace font, making it easy to keep text perfectly aligned. However, the preformatted block also includes styling and the ability to add hyperlinks that a code block doesn’t have.

Unlike the paragraph block, the preformatted block is originally intended to display any content unstyled although, the preformatted block keeps any spacing or line breaks exactly as they are typed.

Clicking on the cog icon next to the publish button will toggle the visibility of this panel. While most blocks have specific options in the editor sidebar in addition to the options found in the block toolbar, the preformatted block does not have extra options.

The preformatted block settings can be found in the sidebar

Advanced

The advanced tab lets you add a CSS class to your block, allowing you to write custom CSS and apply styles to the block as you see fit.