Developer-Plexscape/ngx-grapesjs

Module "ngx-grapesjs" has no exported member NgxGrapesjsModule

narimanam opened this issue · 3 comments

Hi,
I encountered an error in the first step of adding ngx-grapesjs. It appears that NgxGrapesjsModule is missing from the ngx-grapesjs package. Did I overlook something?

For context, I'm using Angular version 18. Here's what I did:

  1. Installed grapesjs.
  2. Added grapesjs-preset-webpage and grapesjs-blocks-basic.
  3. Used ng add to integrate ngx-grapesjs and selected the Webpage Editor option.

Any insights on what might be going wrong?

Hey there! In the latest version of the library, that is 18.0.0, we migrated to the standalone API. Which version do you use?

I just had the same issue, you can fix it by importing the editors directly from ngx-grapesjs as following and add them to the import:

import {
  NgxNewsletterEditorComponent,
  NgxWebpageEditorComponent,
} from 'ngx-grapesjs';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [
    NgxWebpageEditorComponent, // new imports here
    NgxNewsletterEditorComponent,
  ],
  templateUrl: './app.component.html',
  styleUrl: './app.component.scss',
})

@GregLtrnr that's correct! It appears that the README file in the npm registry has not been updated with the correct usage described here.