我正在尝试集成PrimeNG editor
在JHispter
生成angular
应用程序。
我关注了 PrimeNG 网站 general instructions和 editor instructions :
-
npm install primeng --save
-
npm install @angular/animations --save
-
npm install quill --save
- 将 Quill 添加到
angular-cli.json
中的脚本中 - 进口
EditorModule
在home.modules
- 已添加
<p-editor [(ngModel)]="text" [style]="{'height':'320px'}"></p-editor>
在 html 文件中 - 已执行
npm start
命令来运行应用程序。
ERROR ReferenceError: Quill is not defined at Editor.ngAfterViewInit (webpack-internal:///./node_modules/primeng/components/editor/editor.js:36)
谢谢
最佳答案
我也遇到了同样的错误。
将以下行添加到我的 webpack.common.js 插件中,现在它可以工作了。
new webpack.ProvidePlugin({ Quill: "quill" })
关于angular - 如何将 PrimeNG 编辑器集成到使用 Jhipster 创建的 Angular 应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48246938/