gpt4 book ai didi

reactjs - 无法使用 CKeditor5 的 'Simple upload adapter' |遇到错误 - CKEditorError : ckeditor-duplicated-modules

转载 作者:行者123 更新时间:2023-12-04 11:36:40 43 4
gpt4 key购买 nike

我正在使用 reactjs 和 ckeditor5-react。我正在通过标准文件使用简单上传适配器
https://ckeditor.com/docs/ckeditor5/latest/features/image-upload/simple-upload-adapter.html

但它因以下错误而失败:

CKEditorError: ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-ckeditor-duplicated-modules
▶ 2 stack frames were collapsed.
__webpack_require__
D:/Projects/nodejs/node-react-firebase-flashcards/firecards/webpack/bootstrap:785
782 | };
783 |
784 | // Execute the module function
> 785 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 786 |
787 | // Flag the module as loaded
788 | module.l = true;

package.json - 相关部分:
  "dependencies": {
"@ckeditor/ckeditor5-build-classic": "^12.0.0",
"@ckeditor/ckeditor5-react": "^1.1.3",
"@ckeditor/ckeditor5-upload": "^12.0.0",

我的进口
import React, { Component } from "react";
import CKEditor from "@ckeditor/ckeditor5-react";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import SimpleUploadAdapter from "@ckeditor/ckeditor5-upload/src/adapters/simpleuploadadapter"; ```


Within render:
<CKEditor
editor={ClassicEditor}
plugins={SimpleUploadAdapter}
data="<p>Hello from CKEditor 5!</p>"
onInit={editor => {
// You can store the "editor" and use when it is needed.
console.log("Editor is ready to use!", editor);
}}
onChange={(event, editor) => {
const data = editor.getData();
this.setState({ cardEditor: data });
console.log({ event, editor, data });
}}
onBlur={(event, editor) => {
console.log("Blur.", editor);
}}
onFocus={(event, editor) => {
console.log("Focus.", editor);
}}
/>

I was planning to use this to upload files and images. What could be the reason for this?

最佳答案

关于reactjs - 无法使用 CKeditor5 的 'Simple upload adapter' |遇到错误 - CKEditorError : ckeditor-duplicated-modules,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58508534/

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