Developer-Plexscape / ngx-grapesjs

Angular wrapper library for GrapesJS
MIT License
15 stars 4 forks source link

Module "ngx-grapesjs" has no exported member NgxGrapesjsModule #21

Open narimanam opened 1 month ago

narimanam commented 1 month ago

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?

bampakoa commented 2 weeks ago

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?

GregLtrnr commented 1 week ago

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',
})
bampakoa commented 1 week ago

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