Issue #1420šŸ’¬ AnsweredOpened September 12, 2018by sureshDurai1230 reactions

Customizing Block(section block) While Dragging it

Quick answerby nojacko

If your sections always require 1 or 2 columns, why not remove the section and column blocks, instead, add new blocks for "section with 1 column" and "section with 2 columns" and save the popup?

Read full answer below ↓

Question

Hi I have seen that there was two separate blocks to add 'sections' and 'columns'.We have a flow like when we drag a section into canvas need to show a popup on that we manually able select the section to be one column section/two column section,how do we achieve this.

And also we have seen the method editor.on('component:selected' which is triggered while dropping the block ,Is we need to use this to customize the section separation then how we do this.

Thanks in advance

Answers (3)

nojacko• September 12, 2018

If your sections always require 1 or 2 columns, why not remove the section and column blocks, instead, add new blocks for "section with 1 column" and "section with 2 columns" and save the popup?

sureshDurai123• September 12, 2018

Yeah it is possible only .But we have the requirement that we need to show single section to customer and based their pick in popup only we need to split it.

nojacko• September 12, 2018

Ok. In that case, it's the canvas:drop event. Hook into that, check it's a section and open your modal. I'm not sure on how you insert the columns but hope this helps.

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.