ckeditor_insert_blocks
CKEditor 5 plugin allow insert block with a single click, a menu appears, allowing you to select and insert any type of block, including custom module blocks, blocks from views, or content blocks.
The blocks can be select in configuration if not it will show all of block
- Intuitive Block Selection: Easily choose from a variety of available blocks.
- Add class: You can add class for block.
- Add libraries: (Optional) Add custom libraries separated by ,
Select the filter to insert a block, this means that the block will be re-rendered every time you clear the cache (the text content in the ckeditor field does not change).
If you want to use ckeditor 5 filter for each block HTML, you need to
composer require symfony/dom-crawler
drupal 9 does not need it - it is in core drupal 9 not drupal 10 or 11.
it will replace all html block like it by drupal block
<div class="insert-block custom-class" data-block-id="block_id" data-libraries="module1/library1,module2/library2">whatever content block is inserted from ckeditor</div>
If you want to replace block by ajax you can add insert block librairy in your custom theme.
libraries:
- ckeditor_insert_blocks/insert-block-ajaxIt will search all class insert-block and data-block-id to replace updated content by ajax.
If you find this module valuable, consider supporting the developer by buy me a ☕