diff --git a/packages/volto/news/6574.bugfix b/packages/volto/news/6574.bugfix new file mode 100644 index 0000000000..14c92bf08f --- /dev/null +++ b/packages/volto/news/6574.bugfix @@ -0,0 +1 @@ +You can now add a text block by clicking the circled `+` icon ("Add" block button) and selecting "Text" from the pop-up menu. Previously no text block would be inserted. @Abhishek-17h \ No newline at end of file diff --git a/packages/volto/src/components/manage/BlockChooser/BlockChooserButton.jsx b/packages/volto/src/components/manage/BlockChooser/BlockChooserButton.jsx index d75055f375..01999dd0e5 100644 --- a/packages/volto/src/components/manage/BlockChooser/BlockChooserButton.jsx +++ b/packages/volto/src/components/manage/BlockChooser/BlockChooserButton.jsx @@ -135,8 +135,15 @@ const BlockChooserButton = (props) => { onInsertBlock={ onInsertBlock ? (id, value) => { + if ( + data['@type'] === value['@type'] && + value['@type'] === 'slate' + ) { + onMutateBlock(block, { ...data, ...value }); + } else { + onInsertBlock(id, value); + } setAddNewBlockOpened(false); - onInsertBlock(id, value); } : null }