javascript - ngx-tinymce-editor没有导出成员 'NgxTinymceModule'

标签 javascript angular typescript angular-cli

我正在尝试实现 ngx-tinymce-editor 进入我的项目,但这里似乎存在障碍。这是插件本身的错误,还是我在这里遗漏了一些东西。

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'

这就是我尝试将tinymce编辑器包含在组件中的方式:

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 {}

我什至尝试将其模块包含到 app.module.ts 中但到目前为止,还没有发生任何事情。

我正在使用默认选择器,如下所示:

<ngx-tinymce-editor [(content)]="content"></ngx-tinymce-editor>

我收到以下错误:

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

{ "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 }

但我有 content = ``;在我需要tinymce的组件中添加的属性。

最佳答案

该模块称为“NgxTinymceEditorModule”。尝试导入它,文档似乎显示了错误的名称。

import { NgxTinymceEditorModule } from "ngx-tinymce-editor";

imports: [SharedModule, NgxTinymceEditorModule.forRoot()],

关于javascript - ngx-tinymce-editor没有导出成员 'NgxTinymceModule',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50734940/

相关文章:

javascript - 输入类型单选按钮已选中 else 语句在 jquery 中不起作用

angular - 使用 ngUpgrade 测试 Angular 应用程序失败,返回 "Unknown provider: ng2.InjectorProvider <- ng2.Injector"

typescript - 构建 typescript 前端库

angular - 如何在 Ionic 2 中使用 angular 2 服务?

javascript - 除非在全局范围内,否则音频 .pause() 方法不起作用

javascript - 在 AngularJS 中,ui-view 加载的内容无法读取父内容中的 javascript 文件

javascript - jQuery 在 JS 文件中不可用

未触发 Angular 4 动画, "ng-animate-queued"类已添加到元素

dart - 如何在Angular2 Dart中查询Dom元素?

javascript - 使用 RouterLink 动态添加元素