[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)
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.
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?
hi there! see if this can help you out. cheers.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #954
[Question] Drag&drop of button on demo has additional css attributes
Hi, On the newsletter demo, when drag&dropping a button, some additional css attributes are added to the <a>. It seems like they come from...
Issue #2216
[Question] Automatic resizing for oversized images
If I drop an image that's larger than the canvas, then double click the top left anchor, the width is adjusted to the size of the canvas. I...
Issue #1632
[QUESTION] control table cell (add row, column..)
Hello. I want to dev some of feature to control the table. There are many feature for table the other editor like add columns, rows, set co...
Issue #2933
QUESTION: Is there a way to listen to class name changes
I have created a added a component to the "view". I want to show this component only in view (and not add to model/html thus added to the v...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.