grapesjs
grapesjs copied to clipboard
QUESTION: Allow to only edit text
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.
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))
}