如何在 React 组件中使用 ckeditor 完整版

how use ckeditor full version in react component

我在项目中使用 react-ckeditor,加载正常。 但我需要在页面中使用 ckeditor 完整版作为编辑器

我怎么能用react-ckeditor完整版而不是标准版呢?

来自documentation

By default, the CKEditor 4 React component loads the standard preset of the latest CKEditor 4 release from the CDN when creating the first editor. This behavior can be altered by changing the value of the CKEditor.editorUrl variable to point to the desired CKEditor script location:

CKEditor.editorUrl = 'https://your-website.example/ckeditor/ckeditor.js';

可以从 https://ckeditor.com/ckeditor-4/download/ 下载 zip 文件并将其压缩到源代码中(例如,如果使用 create-react 应用程序,则在 public/ckeditor-4 文件夹中)。

我也遇到了同样的问题,因为我想在我的工具栏中包含所有可用选项。结果你需要做的就是在你的 CDN link 中提及 distribution 的类型 full-all,以包含完整的预设连同 CKSource 创建的所有其他插件。

我在我的 CDN link 中将其从标准更改为完整,如下所示-

<script src="https://cdn.ckeditor.com/4.16.0/full-all/ckeditor.js"></script>

另外,检查一下版本。这是我的信息来源:https://cdn.ckeditor.com/

希望这对您有所帮助:)