Customize result from image drag'n'drop desktop
Check this one https://github.com/artf/grapesjs/issues/2472#issuecomment-570228050
Read full answer below โQuestion
Hello,
I'm using GrapesJs with the MJML plugin and when I drag'n'drop an image from my desktop, the dropped result on the wrapper is an "image" component. But in my case I would like that the dropped result is directly a "mj-image" component.
I saw the result from the drag data transfer is computed in this method from the Droppable utils class : https://github.com/artf/grapesjs/blob/ea2f7954937c2306b284e09cf08c6e7bffb9309c/src/utils/Droppable.js#L151
Is there a way to extend this method via a new plugin ?
Thanks
Answers (1)
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1464
Customizing the Component Position
First of all thank you guys for this awesome library, And I have one Clarification that is how do i customize the drop position example if...
Issue #3200
Help needed: Get the component that a block being dropped onto?
Hello, If I drag and drop a block on a dynamically added component, how can I get/access the component that the block is dropped onto? I se...
Issue #2917
Style Manage does not hide style blocks
Hey @artf, I'm trying to hide style properties based on the selected element. for example, when I drag and drop an image on my GrapesJS, I...
Issue #2744
Disable a block drag&drop
Hello everyone, I would like to make forbidden the drop of one block before another specific one. Context : i've create a new trait for som...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins โ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.
Tutorial
GJS.Market Is Now Available for India ๐ฎ๐ณ
GJS.Market is expanding its global presence with a dedicated experience for developers, agencies, SaaS companies, and digital creators in India
Tutorial
How We Built Composeit in Record Time Using GrapesJS Shadcn
Bypass foundational builder boilerplate and focus on what truly matters.
Tutorial
GrapesJS Document Blocky โ Build Professional Documents with Drag-and-Drop Ease
If youโve ever tried to build invoices, reports, proposals, or client documents using a drag-and-drop editor โ you know how tricky it
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.