Issue #3683Opened August 9, 2021by mingxin-yang2 reactions

How to set the component cannot be deleted

Question

image

Answers (3)

artfAugust 11, 20211 reactions

To enable rich text editor on one click, you can extend the original text component in this way

editor.Components.addType('text', {
    view: {
      events: {
        input: 'onInput', // Preserve the original on input event which updates RTE toolbar position
        click: 'enableRte',
      },
      enableRte() {
        this.onActive()
      }
    },
});
artfAugust 9, 20210 reactions

I'd suggest creating a custom Component with removable property set to false

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.