Issue #1652Opened December 12, 2018by suresh52 reactions

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)

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

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

cjpollardJanuary 25, 20190 reactions

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.