Issue #3043✓ SolvedOpened September 23, 2020by mmotov2 reactions

Allow to only edit text

快速解答by mmotov2

Ok, I found solution for that #336 I did this

Read full answer below ↓

Question

Hi there! I wonder if it's possible somehow to allow edit only text, or upload images, and restrict to change everything else? The purpose of that is to allow designer create website, and user will fill only content. Thank you in advance.

Answers (1)

👍 Most helpfulmmotovSeptember 24, 2020

Ok, I found solution for that #336 I did this

editor.DomComponents.getComponents().each(c => restrictUpdate(c));

restrictUpdate(component) {
          component.set({
            removable: false,
            draggable: false,
            droppable: false,
            stylable: false,
            copyable: false,
            resizable: false,
            editable: true,
            selectable: true,
            badgable: false,
            highlightable: false

          })
        component.get('components').each(c => this.restrictUpdate(c))
}

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.