Rich Text

The Rich Text field creates a text editor option for the block suitable for formatted blocks of text. You can include bold, italics, code, and strikethrough text as well as links and inline images.

This field type is exclusive to Block Lab Pro.


  • Help Text: Instructions to describe the data needed in the field.
  • Default Value: The default value for this field when adding the block.
  • Placeholder Text: The helper text which appears when the input is empty.

PHP API Controls

  • name
  • label
  • control
  • type
  • order
  • help
  • default
  • placeholder

Template Usage

To display the Rich Text field in your template, use the field name you provided.

<?php block_field( 'pets-description' ); ?>

Example template file /blocks/block-block-lab-example.php

// Block Lab Example Rich Text Field
<h2>Pet's Description</h2>
 <p><?php block_field( 'pets-description' ); ?></p>

To use the block with the Rich Text field on your site, locate it in the blocks menu.

Screenshot showing the Block Lab custom block in the menu

It will then display within your post/page.

And on the front-end of your site.