Override Drag functions
Question
Hi @artf I want to override the Drag function of dmode "absolute".
As, of now we have ability to move freely over the canvas and if move anywhere in the desktop it will not be the same in the other mobile and table device. Also It's is on pixels i want to make it in percentage to make it responsive in all the screen.
Could you please help me in this from where i can start and how could i achieve it.
Thanks
Answers (2)
You have to extend the ComponentDrag command
Thanks for reporting this, @Abhisheknanda1344463. Great suggestion about Override Drag functions! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: Listen to selector:add for CSS selector change...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3607
FEAT: code viewer - go to selected canvas block(s)
When view code is clicked and we have selected element(s) in the canvas, code viewer can show it's corresponding code and select it outerHT...
Issue #3223
FEAT: Create the canvas from a URL
I've been playing with GrapesJS and trying to integrate it into a Symfony 5 project. In particular I want to be able to edit templates in t...
Issue #5334
Selection of custom component type not working in the canvas
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome, Opera, Edge, etc Reproducible demo...
Issue #3268
How to add javascript in the html without sanitization?
Hey @artf, I am taking javascript input from the user. I need to add this javascript inside the template HTML but it gets sanitized. Is the...
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
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
Tutorial
GrapesJS in 2026: The Complete Guide to the Open-Source Web Builder Framework
Master GrapesJS in 2026. Architecture, code examples, React integration, plugin development, Studio SDK, and how it compares to other projects
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.