From 4d6c8b87a1984456369eb49f4a535f208f92b74e Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Fri, 24 Jan 2025 09:28:35 +0000 Subject: [PATCH] Configure block previews and descriptions in block chooser within rich text --- client/src/entrypoints/admin/telepath/widgets.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/entrypoints/admin/telepath/widgets.js b/client/src/entrypoints/admin/telepath/widgets.js index c6e94744b9..09816d9d79 100644 --- a/client/src/entrypoints/admin/telepath/widgets.js +++ b/client/src/entrypoints/admin/telepath/widgets.js @@ -243,8 +243,11 @@ class DraftailInsertBlockCommand { this.blockMax = addSibling.getBlockMax(blockDef.name); this.icon = blockDef.meta.icon; - this.description = blockDef.meta.label; + this.label = blockDef.meta.label; this.type = blockDef.name; + this.blockDefId = blockDef.meta.blockDefId; + this.isPreviewable = blockDef.meta.isPreviewable; + this.description = blockDef.meta.description; } render({ option }) { @@ -255,7 +258,7 @@ class DraftailInsertBlockCommand { this.blockMax })` : ''; - return `${option.description}${limitText}`; + return `${option.label}${limitText}`; } onSelect({ editorState }) {