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
[Question]: 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
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline — both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.