#2774May 14, 2020by vinceumo1 answer
Hi, I'm having some issue with mobile first approach. The canvas render the wrong style when setting different styles at multiple breakpoints. But the code generated is good, this issue only happen in the canvas. https://codesandbox.io/s/xenodochial-shockley-s02lp?file=/index.js:496-524Are you using the latest release...
artf
We should apply the same logic from https://github.com/artf/grapesjs/blob/201e1f9a61783080f7be885e9e0be9a40ecc16cc/src/codemanager/model/CssGenerator.js#L151-L162 here https://github.com/artf/grapesjs/blob/201e1f9a61783080f7be885e9e0be9a40...
#2773May 14, 2020by Light08151 answer
Minor bug: When switching video type component to html5 provider it always takes the src of the previous provider. Instead I would expect it to be cleared. This also has another side effect since it seems (without checking code) that you set the provider depending of the src. This is especially annoying when you save...
artf
It should be fixed in the next release, thanks for the report
#2772May 13, 2020by Mohsen-Khakbiz1 answer
hey there. first of all thanks for this sweet lovely tool. what I need is to load js or css files to the canvas depending on traits. let's say I have a button with an option for making it triggering a lightbox. now what I need is to only load the lightbox plugin's files only when this checkbox is checked. I couldn't m...
artf
When you use canvas: { scripts: [], styles: [] } it appends only those files to the canvas of the editor, so you won't see them in your final code (editor.getHtml()). There is no kind of global list but you still can tell the component to...
#2771May 13, 2020by antman33513 answers
Hello, I've just updated to the lasted version 0.16.12 and have a bug when trying to move a component that has the property textable:1 into a text component. It works on the previous version 0.16.3. When i move the component I get an error in the console Uncaught TypeError: Cannot read property 'attributes' of undefin...
artf
I'm leaving here a working example of a textable component https://jsfiddle.net/artur_arseniev/0b9ox72g/
0099FF
Looks to have been introduced in 9c24108dadf2ded39e8805b6c4a5f00c626c468b. As pointed out by @antman3351 the model.getView().render(); call is the trouble maker. A little further down the call stack we attempt to update the view's attribut...
bogdanbs
My 2 ct to this. The problem lies on mixing asynchronous and synchronous code. The enabling of the rte: enable(view, rte) as well as the ComponentTextView.onActive and ComponentTextView.disableEditing are now, since the fix for issue #3475...
#2770May 13, 2020by tiptronic852 answers
Hello, is there a way to select an element after added to the body? When i add a link, i want to open the Component Settings immediately. How can i do it ? Thank you in advance
Mohsen-Khakbiz
I think this should work
tiptronic85
It works, thank you a lot. I add the code only for links and button and it is perfect. if model.is('link')
#2769May 12, 2020by cartifon1 answer
Hey @artf, question, should the core commands be triggered when the keyMap is activated? The situation: I added this listeners: When I delete a component using the delete icon it calls my listener, but when I press the delete key, it does not trigger the listener... Am I doing anything wrong here? You can check it her...
artf
Yeah, you're right, the command handler is executed directly here https://github.com/artf/grapesjs/blob/fbfa812eaaeeb467337107896ee6decfbfbc028e/src/keymaps/index.js#L154 it should pass through Commands.run(id, opts) https://github.com/art...
#2768May 12, 2020by kuhelbeher1 answer
Hello, GrapesJS has bunch of events which could be listened with editor.on. One of them is canvas:drop. But it triggers only when I drop element which hasn't been on canvas yet. But I want to listen when user drops some component which already existed on canvas. Can I achiive this?
cartifon
Hi @kuhelbeher, in the version 16.2 they added that option, you can take a look here: https://github.com/artf/grapesjs/releases/tag/v0.16.2
#2767May 12, 2020by HPsisodia2 answers
I am working on a loopback application and wanted to integrate grapesjs, so that the client can make his own web template which will be later used by the server to send some information overlayed on the template. However, i am not able to integrate grapesjs and run it alongside when the main application when server st...
cartifon
GrapesJS is a Client side JavaScript library, I don't think you can add that to a back-end NodeJS application.... But I may be wrong... What do you think @artf ?
artf
@HPsisodia on the client you render the editor using the grapesjs, with loopback you just provide API (https://grapesjs.com/docs/modules/Storage.html#setup-the-server). If you don't know how to set up the server with loopback, unfortunatel...
#2766May 12, 2020by svalenciano813 answers
Hi Where can I reproduce it? In demo url: https://grapesjs.com/demo-newsletter-editor.html Browser info: Firefox 75.0 How can I reproduce it? Select a table or table-cell and try change background-color with picker selector. The result no change the color :(
svalenciano81
but, why alpha channel is "0" by default in Firefox and is "100" in chrome?
svalenciano81
Increase the alpha channel solve the problem :-)
artf
I close this in favor of #3260
#2765May 12, 2020by svalenciano813 answers
Hi, in grapesjs in Firefox 75.0 when "backspace key" (event.which === 8) is pressed the navigator is going back and grapesjs is lost. To reproduce it: Open Firefox browser Open URL: https://grapesjs.com/ Click on: "Newsletter Demo" buttom Delete a element from editor usign "backspace key" (NOT using supr key) The beha...
artf
Should be fixed in the next release
artf
@juice77 the issue was fixed in the latest release https://github.com/artf/grapesjs/compare/v0.16.17...v0.16.18
tiptronic85
Yes this is very annoying