Skip to content

Prevent user to add new blocks #784

Description

@mparfait

Hi everyone,

Is there already a way to prevent user to add a new blocks.
For example, if I decide to fill the editor with only a block header and a block paragraph, I would like to restrict the user to only edit the header and the paragraph and not to add others headers or paragraphs.

Example here :
`
const editor = new EditorJS({
holderId : 'editorjs',
tools: {
header: {
class: Header,
config: {
placeholder: 'Enter a header'
}
}
},

data : {
  blocks: [
    {
        type: "header",
        data: {
          text: "Mon titre"
        }
      },
      {
        type: "paragraph",
        data: {
          text: "Mon texte"
        }
      }          
    ],
}

});
`
Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions