Issue #1748Opened January 24, 2019by AkibDeraiya1230 reactions

How to prevent drag items inside the editor

Question

Hello @artf You are doing great job with grapesjs and it's extremely helpful to make our functionality more user friendly. Thanks for creating such a amazing open source lib.

I want to know that suppose i want to prevent drag of all html content like div, ul, li, etc then how can i? I guess i just need to add some configuration when i initialise grapesjs.init({ .... }).

Actually i am providing default html content as a default template and on that default template/layout user can edit and launch his own website. So, i have one page in my template and i want to prevent like user can't change layout but user can add new component.

I also tried with nativeDnD option but looks like not working for me.

Can you please help me for how can i fix this functionality?

Answers (3)

AkibDeraiya123February 5, 20190 reactions

Hello @artf I have one div which class is like testing and i want to restrict the child items of this div with class testing then how can i do this?

Can anyone guys help me to figure it out? Thanks in advance.

lock[bot]February 5, 20200 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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.