Hello, We have modified the Assset manager with custom one. But we are having problem now. If we drop one image into canvase and then add any other component , it will duplicate that component. If we add another image then it would triplet other component. Can you please help us. Below is the code snippet that we have...
artf
If you get duplicate components only when using your custom Asset Manager, well you should check how you assign the src, I can't help you more
lock[bot]
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.
Drag component to canvasDon't release mouseDrag back to blocks panelComponent is still applied to canvas It should instead cancel
artf
Drag back to blocks panel Honestly, never seen kind of UX... why not the classic Esc? (which works already)
artf
@Geczy Now blocks support HTML5 D&D https://github.com/artf/grapesjs/releases/tag/v0.13.5
Geczy
This is a very common UX anywhere you go https://w3c.github.io/html/editing.html#drag-and-dropHowever it is implemented, drag-and-drop operations must have a starting point (e.g., where the mouse was clicked, or the start of the selection...
Hi. I need the firing of this event in this situation: I have some elements out of the canvas that need to be hide at preview mode and shown when I exit preview mode. However, the event stop:preview doesn't fire when I exit the preview and turn back to canvas editing. I've made a solution myself that works well, but I...
theanhmx
@artf sorry for this stupid question, but when will the fix available in the npm package? or from which branch i can manually pull the code with this fix and build?
lock[bot]
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.
Hey, How can I trigger some event when any new block or content inside canvas is updated? Something like editor.onCanvasUpdate() Thanks!
ryandeba
Hi @fsaiyedOB, I've been able to accomplish this with the component:update event listed here: https://github.com/artf/grapesjs/wiki/API-Editor#available-events My code looks something like
duskhacker
When I asked to find out when the canvas is dirty to provide an indicator, @artf told me:
Hi @artf , how can i import content dynamically from program that automatically reflect in canvas.
duskhacker
@suraj740 editor.setComponents() will take both html/css, so you could just skip the setStyle call. As for the rest, you did look at the storage manager documentation, yes? You can call load/store on it programmatically without clicking a...
duskhacker
In my project, I set data- attributes on an HTML element and extract them via .dataset in Javascript, once the editor is configured, I run: Be aware that the HTML must be set up so that grapesjs can understand it. I believe that it must ad...
I can see classes are added on canvas but when I get html via editor.gethtml(), i so some of classes are not included and it is just divs without any classes. attached screenshot with html on canvas and html via editor.gethtml()
Geczy
Don't think gjs- prefixed classes will return
arthuralmeidap
When you use the editor.getHtml it returns just the html . If you need the css too, you can use the editor.getCss().
Geczy
I use newsletter-plugin and const html = window.grapesjs.editors[0].runCommand('gjs-get-inlined-html')
Steps to reproduce on http://grapesjs.com/demo.html :Click on the Layer Manager.Hide any layer, e.g.: the Header.Save the content - this happens automatically on the demo - which uses browser local storage, with auto-saving every single step.Reload the page. Result: The hidden layer is not visible on canvas, but still...
artf
Thanks for the catch @tomichal the fix will be available in the next release
lock[bot]
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.
@artf Sorry for creating another issue but I tried below code also I have created codepen for same. Codepen and still it only return empty div via editor.getHtml(), I can see html updated in canvas but not on model. Also updateSrc() and updateh2Content() function has var linkModel = this.get("components").at(0); undef...
lock[bot]
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.