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)
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 ?
@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.
@adityaMurarka i see the problem, i guess there are some conflicts when they all gather together! leaving aside
mjmlhere 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
mjmlbut 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.
Issue #2431
Social Blocks
Hi guys, I am trying to include social elements blocks in my project. I am already using gjs-preset-webpage plugin for basic blocks. I want...
Issue #1466
Editing Saved html editor.setComponents slider load issue
I am working on a project where i integrated grapesJs for users to build there templates, save them in database and edit these saved templa...
Issue #886
[HELP WANTED]: questions about some customization.
Hey Guys, first thank you very much for your work, this project seems really promising. I have a few question for a website i'm building. I...
Issue #3135
[Help Wanted] How to easily override existing component ?
For example, I want to add a double click event handler on the default video component to open the assets manager. My basic idea was to get...
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.