working in grapesjs adding templates as components with add CSS but CSS not import. Also tried the public/index.html file but not working. Help!
canvas: {
styles:[
'<link rel="stylesheet" href="http://localhost:3000/assets/css/headers/style.css" type="style.css" />',
'<link rel="stylesheet" href="http://localhost:3000/assets/css/headers/bootstrap.css" type="text/css" />',
],
},
Just call from local driectory like: C:/documents/[your project source]/
Not go with localhost
You only need to specify the URL of the stylesheet, not the entire link tag.
canvas: {
styles:[
'http://localhost:3000/assets/css/headers/style.css',
'http://localhost:3000/assets/css/headers/bootstrap.css'
]
}
it's Working on removing link tags and only defining with localhost link.
canvas:{
styles:[
'http://localhost:3000/assets/css/headers/style.css',
'http://localhost:3000/assets/css/headers/dark.css',
]
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.