Issue #1652💬 AnsweredOpened December 12, 2018by suresh52 reactions

In React How to give local css path for grapesjs editor ?

快速解答by cjpollard1

Read full answer below ↓

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)

cjpollardDecember 12, 2018
grapesjs.init({
  canvas: {
    styles: ["style.css"]
  },
  ...
})
suresh5January 22, 2019
grapesjs.init({
  canvas: {
    styles: ["style.css"]
  },
  ...
})

where to store that css file ? i mean path to keep that file in react

cjpollardJanuary 25, 2019

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.