CKEditor 5 缺少可用的工具栏项目
CKEditor 5 Missing Available Toolbar Items
我已经列出了 CKEditor 5 内联编辑器的所有可用工具栏项目,我想知道为什么缺少一些基本项目。我正在使用 https://cdn.ckeditor.com/ckeditor5/1.0.0-beta.1/inline/ckeditor.js 上的构建,文档说它应该包括整套功能。
editor.ui.componentFactory.names() 输出:
- 撤消
- 重做
- 加粗
- 斜体
- 块引用
- imageTextAlternative
- 图片上传
- 标题
- imageStyle:完整
- imageStyle:侧面
- link
- 编号列表
- 项目符号列表
如您所见,CKEditor 4 中包含的一些核心项目丢失了,例如:
- 复制
- 粘贴
- 下划线
- 字体大小
- 文本颜色
- 左对齐
- justifyRight
- justifyCenter
为什么这些物品不见了?是因为 CKEditor 5 还在测试阶段吗?
糟糕!文档不正确。 This guide 是这样说的:
As CKEditor builds come with all features enabled, the only way to add more features to them is to create a custom build.
虽然应该这样说:
As CKEditor builds does not include all possible features, the only way to add more features to them is to create a custom build.
此外,您很不幸发现了那个错误,因为,例如在 构建中 –
概述 指南文档说:
If a build does not provide all the necessary features or you want to create a highly optimized build of the editor which will contain only the features that you require, you need to customize the build or create a brand new one. Check Custom builds for details on how to change the default builds to match your preferences.
为什么不在所有版本中包含所有功能?
大多数构建(classic, inline, balloon) contain only the features listed in Editor Recommendations(有一个小例外和一个缺失的功能——表格)。我们将这种设置称为 "article preset"。
还有document editor build,它实际上是解耦的编辑器创建器+文档预设。文档预设比文章预设宽很多
那么,为什么不在所有版本中包含所有功能?因为这样的建筑会很大。这不仅会影响性能(加载时间、执行时间),还会影响用户体验。每个编辑器集成都应根据使用它的特定环境进行调整。功能集及其配置需要根据用户能够编辑的内容、生成方式和生成内容进行调整。不幸的是,大多数开发人员会因为功能可用而启用太多功能,这会导致糟糕的集成、糟糕的用户体验以及此类集成产生的糟糕内容。
因此,我们提出了我们认为合理的设置,并略微迫使开发人员思考他们真正需要什么。
在哪里可以找到所有功能?
在examples and on the features list。有些功能在任何构建中都不可用,因此它们可能只能在功能列表中找到,有些功能太常见而无法在功能列表中列出,因为它们在示例中可用。
如果您在这些地方都找不到某些功能,那么它可能尚未实现。您可以在 existing issues 中搜索它或报告一个新的。
我已经列出了 CKEditor 5 内联编辑器的所有可用工具栏项目,我想知道为什么缺少一些基本项目。我正在使用 https://cdn.ckeditor.com/ckeditor5/1.0.0-beta.1/inline/ckeditor.js 上的构建,文档说它应该包括整套功能。
editor.ui.componentFactory.names() 输出:
- 撤消
- 重做
- 加粗
- 斜体
- 块引用
- imageTextAlternative
- 图片上传
- 标题
- imageStyle:完整
- imageStyle:侧面
- link
- 编号列表
- 项目符号列表
如您所见,CKEditor 4 中包含的一些核心项目丢失了,例如:
- 复制
- 粘贴
- 下划线
- 字体大小
- 文本颜色
- 左对齐
- justifyRight
- justifyCenter
为什么这些物品不见了?是因为 CKEditor 5 还在测试阶段吗?
糟糕!文档不正确。 This guide 是这样说的:
As CKEditor builds come with all features enabled, the only way to add more features to them is to create a custom build.
虽然应该这样说:
As CKEditor builds does not include all possible features, the only way to add more features to them is to create a custom build.
此外,您很不幸发现了那个错误,因为,例如在 构建中 – 概述 指南文档说:
If a build does not provide all the necessary features or you want to create a highly optimized build of the editor which will contain only the features that you require, you need to customize the build or create a brand new one. Check Custom builds for details on how to change the default builds to match your preferences.
为什么不在所有版本中包含所有功能?
大多数构建(classic, inline, balloon) contain only the features listed in Editor Recommendations(有一个小例外和一个缺失的功能——表格)。我们将这种设置称为 "article preset"。
还有document editor build,它实际上是解耦的编辑器创建器+文档预设。文档预设比文章预设宽很多
那么,为什么不在所有版本中包含所有功能?因为这样的建筑会很大。这不仅会影响性能(加载时间、执行时间),还会影响用户体验。每个编辑器集成都应根据使用它的特定环境进行调整。功能集及其配置需要根据用户能够编辑的内容、生成方式和生成内容进行调整。不幸的是,大多数开发人员会因为功能可用而启用太多功能,这会导致糟糕的集成、糟糕的用户体验以及此类集成产生的糟糕内容。
因此,我们提出了我们认为合理的设置,并略微迫使开发人员思考他们真正需要什么。
在哪里可以找到所有功能?
在examples and on the features list。有些功能在任何构建中都不可用,因此它们可能只能在功能列表中找到,有些功能太常见而无法在功能列表中列出,因为它们在示例中可用。
如果您在这些地方都找不到某些功能,那么它可能尚未实现。您可以在 existing issues 中搜索它或报告一个新的。