Issue #2382Opened November 6, 2019by adityaMurarka3 reactions

Importing Basic Blocks

Question

Hi guys,

I am building a project using grapesjs editor and I want to enable user to build his website easily using the editor. To do so I want as much as blocks avaiilable by deafult to help him do so. Whatever I'll is not there I am planning to build them by myself. So there are basically Presets for the grapesjs and each of them have their own set of blocks with some common in them. I want to import all them in my project.

So is there a way to do so ?

Thanks in advance.

Answers (3)

adityaMurarkaNovember 6, 20191 reactions

Hi there! you can specify the list of plugins you want:

  var editor = grapesjs.init({
      container : '#gjs',
      plugins: ['plugin-name-1', 'plugin-name-2'],
 });

cheers!

Hi pouyamiralayi, I tried your approach but it didn't worked. When i try to import GrapesJS Newsletter Preset I am getting 14 of the blocks and on importing GrapesJS Preset Webpage I am getting 9 blocks, but on importing both of them I am still getting just 14 blocks and not all of them. Also not able to import GrapesJS MJML blocks . Is there anything I am doing wrong or any other approch you might know ?

pouyamiralayiNovember 6, 20191 reactions

@adityaMurarka i see the problem, i guess there are some conflicts when they all gather together! leaving aside mjml here is what i did (it only drops a few items):

plugins: [
            'gjs-preset-newsletter',
            'gjs-preset-webpage',
        ],

please notice the order of the items, also i tried to include mjml but it seems it overwrites the others! please consider adding the [BUG] word to the issue title.

adityaMurarkaNovember 6, 20191 reactions

@adityaMurarka i see the problem, i guess there are some conflicts when they all gather together! leaving aside mjml here is what i did (it only drops a few items):

plugins: [
            'gjs-preset-newsletter',
            'gjs-preset-webpage',
        ],

please notice the order of the items, also i tried to include mjml but it seems it overwrites the others! please consider adding the [BUG] word to the issue title.

@pouyamiralayi Thank You so much for your help !!. It worked for both of the plugins. @artf Can you help with the MJML preset plugin.

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.