Issue #519Opened November 14, 2017by enricribas0 reactions

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.

image

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)

ryandebaNovember 14, 20170 reactions

@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

enricribasNovember 15, 20170 reactions

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.

lock[bot]September 18, 20190 reactions

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.

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.