Reputation: 4098
I am trying to implement ngx-tinymce-editor into my project, but there seems to be a roadblock here. Is this an error with the plugin itself, or am I missing something here.
ERROR in src/app/components/article/article-submit-form/article-submit-form.module.ts(4,10): error TS2305: Module '"*Project Path*/web/node_modules/ngx-tinymce-editor/ngx-tinymce-editor"' has no exported member 'NgxTinymceModule'
This is how my component that I am trying to include the tinymce editor in:
import { NgModule } from "@angular/core";
import { ArticleSubmitFormComponent } from "./article-submit-form.component";
import { SharedModule } from "../../shared/shared.module";
import { NgxTinymceModule } from "ngx-tinymce-editor";
@NgModule({
imports: [SharedModule, NgxTinymceModule.forRoot()],
declarations: [ArticleSubmitFormComponent],
exports: [ArticleSubmitFormComponent]
})
export class ArticleSubmitFormModule {}
I even tried including its module into app.module.ts
but so far nothing happens the way it should.
I am using the default selector like so:
<ngx-tinymce-editor [(content)]="content"></ngx-tinymce-editor>
and I am getting the following errors:
'ngx-tinymce-editor' is not a known element:
1. If 'ngx-tinymce-editor' is an Angular component, then verify that it is part of this module.
2. If 'ngx-tinymce-editor' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
and
{
"resource": "/d:/Projects/dev/SXNM-PROD/web/src/app/app.component.html",
"owner": "_generated_diagnostic_collection_name_#1",
"code": "undefined",
"severity": 8,
"message": "Can't bind to 'content' since it isn't a known property of 'ngx-tinymce-editor'.\n1. If 'ngx-tinymce-editor' is an Angular component and it has 'content' input, then verify that it is part of this module.\n2. If 'ngx-tinymce-editor' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.",
"source": "Angular",
"startLineNumber": 54,
"startColumn": 21,
"endLineNumber": 54,
"endColumn": 42
}
but I have the content = ``;
property added inside my component that needs tinymce.
Upvotes: 0
Views: 1417
Reputation: 621
The module is called "NgxTinymceEditorModule". Try importing that, the docs seem to show the wrong name.
import { NgxTinymceEditorModule } from "ngx-tinymce-editor";
and
imports: [SharedModule, NgxTinymceEditorModule.forRoot()],
Upvotes: 1