We have an app, where we show an HTML element on the product page.
Today we ask the user to add some code (copy paste) to make our “widget” visible.
To make it more user friendly, we would like to change that to a “drag and drop” editor where they can drop where they want to have their element.
You can see here where Klarna is doing this at 2min mark: https://youtu.be/Lj8QvkRkDxo
We don’t want to build an editor app (Like Shogun), we just want our widget to be added to the product page using a more user-friendly approach.
I’m trying to find how to do this, if there is any JS lib or how this is done?
Drag and drop, examples can be found here: https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_draganddrop
And you can get the current HTML code for the site using: document.documentElement.innerHTML
However, I need to modify the liquid file, not the created HTML code that is genereted from that liquid file.
Any suggestion on how to do this?