[QUESTION] How to load external CSS file into Grapes Editor?
Question
Hey, During my editor = grapesjs.init(), I want to load an external CSS file into the canvas using @import url(...). So when I use my custom components which are using those external CSS stylings, should render properly. Also, those URL should include in editor.getCss(). How can I do that? Thanks in advance.
Answers (3)
https://github.com/artf/grapesjs/issues/195 https://github.com/artf/grapesjs/issues/473 https://github.com/artf/grapesjs/issues/444 https://github.com/artf/grapesjs/issues/66
Here are some solutions, please search next time before open an issue.
Thanks for the help. This works perfectly. I tried searching issues with @import query, my bad.
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.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1888
[Question] Add custom html inside canvas
Hi there, I'm using grapes to export a custom json with all the information i need, instead of HTML and CSS. For doing that I'm parsing the...
Issue #1747
[Question] How to re-render the whole library dynamically
Hi Artur, I have this checkbox underneath the editor. If you click it, it will load extra custom components. and if you un-click it, those...
Issue #442
Is it possible to include an external stylesheet in the grapesjs canvas?
We want to create some custom components whose style changes according to an external theme css (there can be different themes), and we wan...
Issue #1814
[Question]: How to fire event which triggers component:selected with my component
I want to select my component whenever it is dragged from blocks to canvas and rendered, I have tried with registering events on component:...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.