Issue #2018💬 AnsweredOpened May 15, 2019by nternouski2 reactions

BUG When import as module Angular 6

Quick answerby joshberry1

@nternouski I'm guessing you needed to include the gjs-preset-newsletter script in the scripts section of your build in angular.json. Any plugins you want to use need to be included here or the angular build won't know to include them.

Read full answer below ↓

Question

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 on build, the console print: Please Help me. Thanks for your time.

Answers (3)

joshberryAugust 10, 2019

@nternouski I'm guessing you needed to include the gjs-preset-newsletter script in the scripts section of your build in angular.json. Any plugins you want to use need to be included here or the angular build won't know to include them.

joshberryAugust 11, 2019

If you don't add it globally, you'll need to manually register the plugin with grapesjs. Then, be sure to use the ID you configured and not the variable name when initializing.

artfMay 19, 2019

Hi @nternouski, unfortunately, that plugin still uses the old exporting, so you have to use it like this:

import grapesjs from "grapesjs";
import "grapesjs-preset-newsletter";
...
grapesjs.init({
 ...
 plugins: ["gjs-preset-newsletter"],
 ...
})

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.