Issue #3046πŸ’¬ AnsweredOpened September 24, 2020by jesusdp1 reactions

How to keep default sections in the canvas without the possibility to be removed by the user?

Quick answerby MartinPutz❀ 1

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)

MartinPutzβ€’ September 27, 2020

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

jesusdpβ€’ September 30, 2020

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.

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.