Load external css in editor
@micker you must include them like this: I do not see the `canvas` object in your setup. Cheers!
Read full answer below โQuestion
hello i search a lot but i didn't find how to load a css file inside editor My code regards of other issue i add styles: [\'http://localhost/flexidev/templates/shaperhelix3/css/template.css\'] no real error but no style ... what i forgot ? function fclayoutinitbuilder(editorsfx, elementid) { /*Lets say, for instance, you start with your already defined HTML templateand you\'d like to import it on fly for the user / var LandingPage = { html: \'<h2>This is the layout area, you may drag and drop to add your blocks here, to load flexicontent field use data panel to insert flexicontent block</h2>\...
Answers (3)
@micker you must include them like this:
canvas: {
styles: ['bundle1.css', 'bundle2.css'],
scripts: ['bundle1.js', 'bundle2.js'],
},
I do not see the canvas object in your setup.
Cheers!
@micker if your customCss is a url, that's the way to include it. but if you you have some styles that you want to include by hand, here is the procedure:
editor.addComponents(
`
<style> div { background: teal} </style>
`
)
Cheers!
i try to use https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates but i not sure about this ... if i add canvas like this i have this error seams doesn't link `canvas: { scripts: null, styles: [\'http://localhost/flexidev/templates/shaper_helix3/css/template.css\'] //Is there any...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2416
Unable to display template from database to grapesjs
Able to fetch my remote HTML file using load URL and getting status ok, how can I load this fetched HTML AND CSS into editor? currently I'm...
Issue #425
How to render external js file in our custom plugins
Hello, I am creating a slider plugins but its not working. because. I am not able to find how i can add or use external scripts and css fil...
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 #4082
Remove some initial styles from frame canvas
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v96 Reproducible demo link No demo...
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
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps โ a beginner-friendly 2026 comparison
Tutorial
Lighthouse for GrapesJS: Audit Accessibility and SEO Without Leaving the Editor
Live WCAG 2.1/2.2 accessibility auditor + SEO manager for GrapesJS. Every finding is bound to the exact component โ click to select, then one-click fix.
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners โ this post is for you.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.