我試圖使用primeng編輯器控制:https://www.primefaces.org/primeng/#/editorPrimeNg錯誤:奎爾沒有定義
但我得到的錯誤:
ERROR ReferenceError: Quill is not defined at Editor.webpackJsonp.../../../../primeng/components/editor/editor.js.Editor.ngAfterViewInit
我的項目使用:
- Angi Cli:1.4.1
- Angular:4.3.6
- NPM:5.4.1
- 節點:6.10.0
- PrimeNG:4.2.0
我發現這個問題:https://github.com/primefaces/primeng/issues/807
我跟着指示:
導入編輯器模塊
import {EditorModule} from 'primeng/primeng';
安裝軟件包:
npm install quill --save
npm install @types/quill --save
更新角cli.json
"styles": [ "../node_modules/quill/dist/quill.core.css", "../node_modules/quill/dist/quill.snow.css", ], "scripts": [ "../node_modules/quill/dist/quill.js" ],
但它仍然有同樣的問題。我只是添加默認的標記:
<p-editor [(ngModel)]="text" [style]="{'height':'320px'}"></p-editor>
而我得到的錯誤,它看起來是這樣的:
在該線程我沒有嘗試的唯一的事情正在安裝的WebPack插件因爲我正在使用角度cli,我不認爲這是一個選項。
我該如何解決這個問題?
你有什麼想法,它初始化這個控制測試? –