SVG Component Not Draggable
@artf please see that It is very important for me to solve this problem.thanks
Read full answer below βQuestion
Hi, I am using grapesjs in angular 7.What I want to achieve when ever canvas drop method called I add svg component in canvas.I have add svg component on canvas drop method.But its not draggable. I attach my code and video for better understand.Thanks @artf if you help me. <code>const domComponents = this._editor.DomComponents;</code> <code>const wrapperChildren = domComponents.getComponents();</code> <code>comp = wrapperChildren.add({</code> <code> tagName: 'svg',</code> <code>type: 'svg',</code> <code>attributes: { viewBox: '0 0 100 100', xmlns: 'http://www.w3.org/2000/svg' },</code> <code>...
Answers (3)
@artf please see that It is very important for me to solve this problem.thanks
Unfortunately, HTML5 drag and drop API doesnβt work on SVG elements, so if you need to support it you have to wrap your SVG components (eg. in a div element)
@artf ok thanks
Related Questions and Answers
Continue research with similar issue discussions.
Issue #705
Drag placeholder for rendered elements
Hello! I'm digging through code and I'm trying to achieve a placeholder effect while dragging the element? Something similar already exists...
Issue #1629
Grapesjs- When i drag and drop the video into the canvas, i want it to be selected on Component Setting right away
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grape...
Issue #3135
How to easily override existing component ?
For example, I want to add a double click event handler on the default video component to open the assets manager. My basic idea was to get...
Issue #3115
Component droped position is wrong when I changed canvas size under Absolute/Designer mode
WARNING I changed the canvas size and I drop a compent from blocks panel. The result is compent postion is wrong. By the way, the editor is...
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
How to add a custom block in GrapesJS (2026)
Add custom drag-and-drop blocks to GrapesJS with the Block Manager: content, categories, media icons, and reusable component-backed blocks.
Tutorial
π Introducing GrapesJS Email Blocky: The Ultimate Email Block Library for GrapesJS
Building professional, responsive, email-safe templates has always been one of the biggest challenges for developers and marketers.
Tutorial
Superβ―Tooltip for GrapesJS β Versionβ―0.1.5 Released π
Weβre excited to announce the vβ―0.1.5 update of Superβ―Tooltip, our floatingβmenu and tooltip plugin for GrapesJS
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.