Loading from package in TypeScript giving undefined error.
It's happening just because grapesjs-preset-newsletter uses an old way of loading the plugin, I'll fix it soon
Read full answer below βQuestion
Similar to issue #902 but I can't seem to resolve with the steps taken in that discussion. I'm using the latest version of Angular, Webpack, and TypeScript. I'm able to get the editor itself up fine. However, when I try to import grapesjs-preset-newsletter, I'm getting grapesjs is not defined. My imports look like this: Then, in ngOnInit, I'm calling: This doesn't load the preset. The interesting thing is if I have grapesjsNewsletters anywhere in my code, I get grapesjs is not defined. Am I missing something blatant about how webpack or TypeScript imports work with grapesjs presets? Thank you...
Answers (3)
It's happening just because grapesjs-preset-newsletter uses an old way of loading the plugin, I'll fix it soon
Im having the same issue, was this ever resolved?
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 #5377
Error: node_modules/grapesjs/dist/index.d.ts:12551:2 - error TS1005: '?' expected. 12551 }> ? C : {}) | undefined) => (editor: Editor) => void; ~ Error: node_modules/grapesjs/dist/index.d.ts:12558:3 - error TS1005: '?' expected. 12558 }> ? C : {}) | undefined) => (editor: Editor) => void;
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeDescribe the bug After Upgrade new ver...
Issue #843
[QUESTION] - CssComposer - removes unused classes
hi @artf , I import a html , using import from grapesjs-preset-newsletter, with some css classes inside the <style> tag. After the import,...
Issue #1966
[QUESTION] Loop over all components
Hi all, I want to create a socket for every button that I add to the canvas. This is working just fine. However, when I reload (using stora...
Issue #1908
[question] Cannot read property 'indexOf' of undefined
I found a previous result here: https://github.com/artf/grapesjs/issues/1772 however I can still not get it to work, using the most basic s...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.