Replies: 1 comment
-
You should be able to add dynamic CSS via css.addRules. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How can css code be added dynamically to the canvas?
I know the editor init function has the canvas 'styles' option, but that only accepts css files, not css code itself:
let editor = grapesjs.init({ canvas: { styles: [ '/static/dir1/my_style.css', ] }
I tried css.setRule() but for some reason the css is not applied to my loaded page inside grapesjs
Beta Was this translation helpful? Give feedback.
All reactions