How to keep default sections in the canvas without the possibility to be removed by the user?
By default all components are removable, so that's already covered. In terms of not allowing certain components to be removed, you can take a look at the component api:https://grapesjs.com/docs/api/component.html#component You would need to set 'removable':false for your three containers. Adding components during init...
Read full answer below βQuestion
I want to generate a PDF Tool to have three main sections: HEADER, BODY and FOOTER. The three sections needs to be there always and I want to disable the possibility to allow the users to delete those sections. The rest of the components like images, text, columns, etc. needs to be editable like remove them if the user want to do that.
<img width="1888" alt="Captura de Pantalla 2020-09-24 a la(s) 8 01 30 a m" src="https://user-images.githubusercontent.com/10049157/94148536-5a052180-fe3c-11ea-90af-f94d2a395ebb.png">Answers (2)
By default all components are removable, so that's already covered. In terms of not allowing certain components to be removed, you can take a look at the component api:https://grapesjs.com/docs/api/component.html#component You would need to set 'removable':false for your three containers. Adding co...
By default all components are removable, so that's already covered. In terms of not allowing certain components to be removed, you can take a look at the component api:https://grapesjs.com/docs/api/component.html#componentYou would need to set 'removable':false for your three containers. Adding com...
Related Questions and Answers
Continue research with similar issue discussions.
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 #3268
How to add javascript in the html without sanitization?
Hey @artf, I am taking javascript input from the user. I need to add this javascript inside the template HTML but it gets sanitized. Is the...
Issue #2061
[QUESTION] How to place a component at the end of the canvas.
How can I put my footer at the end of the canvas? I want the editor to not allow placing a block/widget below the footer. example
Issue #3328
How can I update the nodeValue (text value) of components by inputs forms
Hello. Grapesjs is a great tool. Thanks for it. I want to update the text value of a component by inputs, how can I do that?? if a user fil...
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.