We want to create some custom components whose style changes according to an external theme css (there can be different themes), and we want those styles to appear in the canvas while editing.
roytang
Please ignore. I ended up injecting the stylesheet link using javascript into Grapes' canvas' iframe // insert external stylesheet into the grapesjs window var iframes = Utilities_GetElementsByClass("gjs-frame", "IFRAME", document.body); f...
artf
You can inject scripts/styles via canvas config option
Hi @vtista the purpose of this part is to load scripts before any other component as one of them might need them as a dependency. Basically, it's trying to simulate the <head> synchronous loading
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.
When remote storage loading fails, it does so silently. One can only guess what the problem might be. I had to validate the JSON externally to know that the data my server was returning wasn't valid. I could also be missing something, so if there is method to load remote data onto the canvas besides the wiki instructi...
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 have a use case where I would like to allow users to switch the template they are editing. On the initial load, the code seems to work fine and loads the template as expected, but on the subsequent loads the canvas is wiped blank.
I'm adding a new component to the canvas using editor.addComponents({ ... }); but it's always added as the last element, to the bottom of the canvas. Is there a way to insert it at a specific point on the canvas? All my components are rows, so ideally I'd like to insert components by index. Thanks, T
I am trying to extend the editor to support css vars i added: to the page and i get in the browser: can you explain how the editor parses the css into the canvas? maybe i am missing something
Can not drop components on canvas in IE 11 but working fine in Firefox, Chrome. While clicking on blocks to drag getting error in console: Object doesn't support property or method 'matches' Also checked on http://grapesjs.com/demo.html getting same error. TIA
Is there a method so that i can drop element anywhere in canvas. Currently it is sorting element,but i want to drop text element on image element. Thanks