Hello! I'm digging through code and I'm trying to achieve a placeholder effect while dragging the element? Something similar already exists for dragging blocks. If I want to add something to achieve this, what method would I need to modify/hook into? I don't see a startDrag option for elements on the canvas. similar t...
artf
Probably the reason of why I gave up ๐ As you see from here https://github.com/artf/grapesjs/blob/dev/src/commands/view/MoveComponent.js#L74 I tried using setDragHelper which copies the element's style from getComputedStyle but I also rem...
artf
Unfortunately, moving components is slightly different so I'm still working on this
artf
Actually, I was thinking about adding such a functionality but didn't go so far ๐ฌ https://github.com/artf/grapesjs/blob/dev/src/commands/view/MoveComponent.js#L74
we load content from db once editor page load and if use select undo after any changes it makes editor canvas blank. Is there way to solve it?
ryandeba
Hi @krunal039, You probably want to clear out the undo history right after populated your content from the db. editor.UndoManager.clear();
krunal039
@ryandeba I tried and now undo and redo button does not do anything(not even blank editor canvas) I have below code [{ id: "undo", className: "fa fa-undo icon-undo", command: function command(editor, sender) { sender.set("active", 0); edit...
ryandeba
@krunal039 Could you create a jsfiddle example that shows the issue? Calling editor.UndoManager.clear() shouldn't completely break the undo/redo functionality, so I suspect there is some other issue going on.
Hello, I've applied a CSS property on the wrapper as follow When I place my mouse on a component, the tools position are not correct and I'm not able to use the toolbar. After a small investigation, I think the issue is in CanvasView.js when the content is added to the wrapper, it should be interesting to check the zo...
artf
Hi Benjamin, thanks for the suggestion but currently I'm not interested in such functionality
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.
Encountered this while developing a plugin. I've reproduced it in the official demo via Browserstack on a different OS and browser, so I'm pretty confident there's a bug here. Exact steps to reproduce:Load the demo, clear the canvas (trash icon), and refresh page to get a fresh demo pageSelect the "Build your template...
artf
Thanks @z1lk I confirm you about the issue in the demo, but the bug behind this was already fixed thanks to #661 The patch will be available in the next release
artf
Should be fixed now https://github.com/artf/grapesjs/releases/tag/v0.12.58
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.
Hi, How can I prevent move, remove properties on the childs? In this case (see code below) the user may move the parent (Template2), but all the childs may not move. I tried it with 'propagate', but these properties are applicable to the parent too. I need an option too aply properties specifically on childs. blockMan...
artf
Hi @effectief, create a wrapper for children with that propagate property
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.
Set the asset manager with the dropzone option set to true (which is true by default), something like that: then drop an image onto the dropzone within the asset manager modal (from the 'gjs-blocks-basic' plugin), then the image gets uploaded to the backend twice. I think this is because the dropzone option turns on u...
artf
@tomichal correct, but dropzone was disabled by default in https://github.com/artf/grapesjs/releases/tag/v0.12.50 we've discussed that here #507
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.
I'm trying to build a basic Header component that lets you select H1 to H6 with a trait. But when an option is selected, the canvas doesn't update. The change is visible in the code view, and if I move the element in the canvas with the drag tool, the tag then changes. I have been reading the API docs as well as the s...
artf
@z1lk I already added such a thing for the next release
z1lk
I'm not sure why el would be a string, but see the commit that closed the issue: https://github.com/artf/grapesjs/commit/e450cb98855d16ad819f1214350825a50e45e910 If you're using the latest Grapes version, the Component listens for a change...
artf
Yeah this is because you can't change the tag name of an existing DOM element. Probably the solution would be, on tagName change, remove and replace the node (at the same position)
My CMS works like this: sites can have one theme and many templates under that theme. Themes are rendered on every page, and templates are rendered only on specific pages. I have successfully integrated GrapesJS with my existing template editor, but I have a question: is there any way to render a theme around a templa...
z1lk
I've fiddled with the code and made a small patch that fits my needs. A config option surround lets you specify an ID, which represents an element in the container. This DOM subtree is plucked out during the main initialization, stored in...
artf
Greate @z1lk I think even something like this will work I close this as you've solved your case
z1lk
I used a solution similar to yours so I don't have to maintain changes to the Grapes source. Sometimes the position of the component "tools" are out of place, as if their vertical offset is computed relative to the body and not the wrapper...
Hello , I want to add new toolbar similar to the toolbar which is shown when any object in canvas is selected( with copy,delete, move functionality) but it needs to be displayed at different position with different set of buttons. Can you please help me? Thanks
artf
@vishal5033 Let's keep "Free Consultancy Requests" out of the issue tracker, thanks
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.
Is it possible to add elements to the canvas that don't have the automatic wrapper added? There is always a parent div added to the "content" is there anyway to have only the content added to the canvas without the wrapper? When this gets dragged to the canvas, it will become Is there anyway to keep it just <div>abc</...
artf
@michaellwatson blocks shouldn't be wrapped (just tested it in the demo), indeed if you drop an image block you just get an img
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.