diff --git a/packages/blocks/src/api/utils.js b/packages/blocks/src/api/utils.js index 0d17836faea7e..a1c85910210b7 100644 --- a/packages/blocks/src/api/utils.js +++ b/packages/blocks/src/api/utils.js @@ -164,6 +164,10 @@ export function getBlockLabel( blockType, attributes, context = 'visual' ) { return title; } + if ( label.toPlainText ) { + return label.toPlainText(); + } + // Strip any HTML (i.e. RichText formatting) before returning. return stripHTML( label ); }