gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 01:43:42 24 4
gpt4 key购买 nike

我正在尝试实现 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com