Allowing only 1 block?
Is there any way to disable the ability to add new blocks?
The way I use this editor is that the content is already present and only use a modified list module.
I need to somehow disable the ability to add new blocks and allow only editing the one existing block.
Did you find how to do it?
I need (some of) the same thing. I want a single-line editorjs that can only add/edit one block.
As a workaround you can limit it via API and hide Plus button via CSS. Read this article, there is a similar solution: https://codex.so/editorjs-max-length
Okay. I have been able to trim blocks using the onchange event handler with the api. I still need:
- "Enter" to not create a new block
- Plus and move button to disappear (edit: fixed setting display: none on .ce-toolbar__actions)
- Make inline toolbar appear outside/ontop of editorjs placeholer/wrapper