Allow to only edit text
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)
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.
Issue #1692
Predefined non-changeable content blocks
Is it possible to create predefined content blocks with data you put in from your backend and which the user cannot change and only place o...
Issue #1096
[FEATURE REQUEST] Support rendering layouts which are not part of the editable content
Basically my use case is that I want to show a whole page - with header, menu(s) and footer - in the editor canvas, but only allow the user...
Issue #3193
FEAT: Change of current internal object store to allow for relation mappings instead of current indexable container implementation
What are you trying to add to GrapesJS? Currently newly instantiated editor instances are added to a indexable collection where the user mu...
Issue #3136
Create one more key in JSON
{ "type": "text", "status": "hovered", "content": "Insert your text here", "attributes": { "id": "ixx2" }, "activeOnRender": 0, "open": fal...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.