how to import the external css styles,eg. boostrap.css
Question
hi, thanks for your great project. I have a problem confused recently. I want to import some react components to my projects,I changed this Jsx to html through renderToStaticMarkup method,and get the result <button type="button" class="ant-btn ant-btn-primary"><span>test</span></button>and I also import this class byimport 'antd/dist/antd.css',but it didn't seem to work, so I'd like to ask you about this question, how to import the external css styles.
Answers (1)
var editor = grapesjs.init({
...
canvas: {
styles: [
'https://...',
...
]
}
});
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2742
[QUESTION] How to prevent unique ids generation?
Hi! Thanks for your work @artf. This is a simplified code of how I use grapesjs, I want to save the styles and then want to apply them agai...
Issue #1083
import template
Hi . I have a json string like this '{ "assets": "[{\"type\":\"image\",\"src\":\"./img/team1.jpg\",\"unitDim\":\"px\",\"height\":0,\"width\...
Issue #2378
[QUESTION] Modifying global CSS in style manager
We want to achieve the following:Mark our block HTML elements with some classes like:Add some styles that define CSS classes like:Using Gra...
Issue #3347
How can I get Uncompressed JS code for me to edit?
Hi, thank you for reviewing my problem. I want to use my own JSEditor to edit html、css and js. 1、First, I use getHtml, getCss, getJs to dis...
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.