Issue #2278Opened September 18, 2019by ivcaRealWare3 reactions

[QUESTION]: Simplify dropping columns/rows

Question

What I need is to simplify dropping elements in a way to speed up page creation. So if I drop a column and there is no parent row there, I would like to be added automatic. Same for dropping row. If I drop a row without container it would be nice to be able to add container automatic. What is the best approach to do that?

Answers (3)

pouyamiralayiSeptember 19, 20192 reactions

hi!

because draggable property for column have value ".row"

just get rid of this. we do not need draggable here because we are doing the check ourselves:

const parent = element.parent()
/* check the parent type here: */
parent.is('your target type') ? /* do not wrap the component*/ : /* wrap the component */

if you need any further help for your specific case, i would appreciate a fiddle. cheers.

ivcaRealWareSeptember 19, 20191 reactions

I try to solve this with that proposal event. But when I try to drop column somewhere else it does not allow because draggable property for column have value ".row" so on editor.on('block:drag:stop', function (element) element is null if column is dropped out of row. So I ether need to change draggable property to true (as it is on container) and then somehow to check if there is row inside and if not to update content or to find another way to do that. Any suggestion?

pouyamiralayiSeptember 18, 20190 reactions

hi there! see if this can help you out. cheers.

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

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.