在Angular上安装CKEditor(版本5)
我正在尝试使用ckeditor5-image安装ckeditor5,但我会遇到Angular 12的错误。我的软件包。JSON在依赖项下的json看起来如下所示
"@ckeditor/ckeditor5-angular": "^4.0.0",
"@ckeditor/ckeditor5-build-classic": "^34.1.0",
"@ckeditor/ckeditor5-image": "^34.2.0",
,如下
ts file html
public Editor = ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ AutoImage ],
} )
editorData =
`<p><a href="https://maps.google.co.uk">https://maps.google.co.uk</a></p>`;
html html文件,
<ckeditor #editor
[data]="editorData"
[editor]="Editor"
id="classic-editor"
name="classic-editor">
</ckeditor>
错误是node_modules中的所有svg文件
./node_modules/@ckeditor/ckeditor5-widget/theme/icons/return-arrow.svg:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
我想知道是否有人可以提供帮助?
I am trying to install ckEditor5 with ckeditor5-image but I get errors with angular 12. My package.json looks as below under dependencies
"@ckeditor/ckeditor5-angular": "^4.0.0",
"@ckeditor/ckeditor5-build-classic": "^34.1.0",
"@ckeditor/ckeditor5-image": "^34.2.0",
My code is as below
ts file
public Editor = ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ AutoImage ],
} )
editorData =
`<p><a href="https://maps.google.co.uk">https://maps.google.co.uk</a></p>`;
html file
<ckeditor #editor
[data]="editorData"
[editor]="Editor"
id="classic-editor"
name="classic-editor">
</ckeditor>
The errors are about all svg files in node_modules
./node_modules/@ckeditor/ckeditor5-widget/theme/icons/return-arrow.svg:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
I wonder if anyone can help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论