In React How to give local css path for grapesjs editor ?
Question
As I am working in Reactjs with grapesjs, I want to load html template in to grapesjs.I am having separate css folder in my local react application ? How to load that css when grapesks editor initializing
Answers (3)
grapesjs.init({
canvas: {
styles: ["style.css"]
},
...
})
grapesjs.init({ canvas: { styles: ["style.css"] }, ... })
where to store that css file ? i mean path to keep that file in react
Depends how you're bundling and serving your pages. For example, if you're serving a build folder, with the CSS in a subfolder there, then use '/css/style.css'.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2261
Load local html file into grapesjs
hello i am pretty new to grapejs i want to load a local html file in the assets folder into grapesjs editor ,pls tellme how i can load loca...
Issue #1700
Grapesjs-react
how to load an html file while starting the GrapesJs-react- editor I tried in this way but it is not working, editor.StorageManager.add('lo...
Issue #1742
How to load local css in to canvas of grapesjs editor in React ? Css path is not taking
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grape...
Issue #1059
Load html content from a file dynamically
Hi, I need to load content from a html file from server onto editor after or while initializing editor. How this can be implemented? HTML w...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins โPremium plugins ship with support, regular updates, and production-ready features โ save days of integration work.
Browse premium plugins โRelated tutorials
In-depth guides on the same topic.
Tutorial
GJS.Market Is Now Available for India ๐ฎ๐ณ
GJS.Market is expanding its global presence with a dedicated experience for developers, agencies, SaaS companies, and digital creators in India
Tutorial
How to Build an AI-Powered Page Builder with GrapesJS in 2026
What we learned building GJSDocs โ from simple AI text generation to structured, context-aware visual editing
Tutorial
How Much Does It Cost to Build a SaaS Page Builder in 2026?
How much does it cost to build a SaaS page builder in 2026? Explore realistic development costs, timelines, features, and how using GrapesJS can reduce
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.