我想添加链接图片功能到我的反应应用程序,使用‘
@ckeditor/ckeditor5-build-decoupled-document代码:
import React from 'react'
import { CKEditor } from "@ckeditor/ckeditor5-react";
import * as DecoupledEditor from "@ckeditor/ckeditor5-build-decoupled-document";但当我进口:
import linkimage from '@ckeditor/ckeditor5-link/src/linkimage';我收到一个错误:
未知CKEditorError: ckeditor-复制-模块
关于图像链接的更多信息

如何添加链接图像?
发布于 2022-05-04 14:39:26
我想你已经做了:
npm install --save @ckeditor/ckeditor5-image并通过以下方式启用插件:
import LinkImage from '@ckeditor/ckeditor5-link/src/linkimage';然后将其添加到编辑器配置中:
image: {
toolbar: [
'imageStyle:block',
'imageStyle:side',
'|',
'toggleImageCaption',
'imageTextAlternative',
'|',
'linkImage' <---- here
]
}即使错误仍然持续存在,也可以尝试它的错误代码文档这里。
Packages were duplicated in node_modules
In some situations, especially when calling npm install multiple times, it may happen that npm will not correctly "deduplicate" packages.
Normally, npm deduplicates all packages so, for example, @ckeditor/ckeditor5-core is installed only once in node_modules/. However, it is known to fail to do so from time to time.
We recommend checking if any of the steps listed below help:
rm -rf node_modules && npm install to make sure you have a clean node_modules/ directory. This step is known to help in most cases.
If you use yarn.lock or package-lock.json, remove it before npm install.
Check whether all CKEditor 5 packages are up to date and reinstall them if you changed anything (rm -rf node_modules && npm install).https://stackoverflow.com/questions/72057070
复制相似问题