No Blocks by default
Question
Using this code
var editor = grapesjs.init({
container : '#gjs',
components: '<div class="txt-red">Hello world!</div>',
style: '.txt-red{color: red}',
});
I get an editor but there are no blocks. I also do not get the icons for the screen size but other icons are there. As you can see the css is getting loaded as the general layout is correct.

What am I missing. I am using Vue but don't think it matters since I am simply running the code in the mounted callback.
Answers (3)
@enricribas As far as I know, there are no default blocks built into the core of grapesjs, however there are plugins available that will add some blocks for you. Check out https://github.com/artf/grapesjs-blocks-basic.
I believe the "screen size" icons have been replaced with the "Device" select in the top-left corner. You might look into what the newsletter preset plugin does to convert those back into buttons - https://github.com/artf/grapesjs-preset-newsletter
I see, thank you. The readme seems to imply that that out of the box, it's more set up but I guess things have been moved to a plugin system, which is nice.
Thanks.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1505
adding row and sections not working
i am integrating grapejs with angular6. but it is not working means it is not showing on blocks i am using following code
Issue #507
uploadFile being called twice on drop file?
I have an editor initialized as so: If I add an image to the canvas and try to upload a new image by dragging it into the drop area in the...
Issue #2018
BUG When import as module Angular 6
in Version: "grapesjs": "^0.14.61", "grapesjs-preset-newsletter": "^0.2.20", i import the script as: and the context is the code: And only...
Issue #859
[QUESTIONS] Change canvas style
Hi there, I have some question about canvas style, in this case i have config like this. By default i use css with name builder-desktop.css...
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.