spell-checking - CKEditor 4 - How to deactivate spellcheck in Source view
问题描述
In wysiwyg mode using CKEditor 4, spellcheck is not enabled. Words can be misspelt & ignored by the Editor as below. This is desired behaviour in our case.screenshot of misspelt word being ignored which is the desired behaviour in our scenario
In Source view however, the same word is picked up as misspelt with a red dotted underline which is not desired behaviour in our case. screenshot of same misspelt word being picked up & marked with red dotted line
How do we prevent spellcheck running (assuming this is what's triggering the red dotted underline) when viewing content in Source view & thereby also stop html code being highlighted with dotted red underlines because the spellcheck simply doesn't recognise them?
解决方案
我测试了以下官方演示链接: https ://sdk.ckeditor.com/samples/spellchecker.html
1-通过工具栏中的ABC按钮禁用拼写检查器
2-禁用浏览器的本机拼写检查器
在 Chrome 上:设置 > 高级设置 > 语言 > 拼写检查(关闭活动语言)
WYSIWYG 和 Source 窗口中的所有错误都应该消失。
其他可能的解决方案:
CKEditor4 配置:
https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-scayt_autoStartup
https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-disableNativeSpellChecker
在 Github ( https://github.com/WebSpellChecker/ckeditor-plugin-wsc )上提交 WebSpellChecker 的问题,因为它是负责拼写检查的第三方:
标准和完整 CKEditor 软件包包括集成的拼写检查功能。它是由使用 WebSpellChecker.net Web 服务的第三方插件 WebSpellChecker 和 SpellCheckAsYouType (SCAYT) 提供的开箱即用解决方案。
如果您不想进行任何拼写检查,请禁用这些插件。如果ABC按钮不再存在,您的问题应该得到解决。
当任一插件启用时,按钮会自动添加到工具栏。根据您使用的插件,它可能包含许多 SCAYT 选项并打开拼写检查对话框窗口。
推荐阅读
- c# - 带有 ViewModel 和实体框架的 ASP.NET MVC 父子
- spartacus-storefront - 使用附加数据扩展 Spartacus NGRX 存储
- ios - fastlane match 生成启用推送通知的新证书
- c++ - 在 MATLAB 中手动编译 Coder MEX 代码时出错
- javascript - 如何在shinyR中创建一个按钮,其事件与传单地图中的多边形绘图工具栏相同
- java - 来自 ARN 的 AWS 目标组逻辑 ID,用于在 cloudwatch CDK 指标中设置 TargetGroup 维度
- swift - 从另一个项目读取 Firestore 数据
- vb.net - VB.net访问将查询插入到具有关系的表中
- angular - Angular:一个共享表组件,添加了从父组件传递的内联按钮
- python - 使用 python 通过 gmail 发送电子邮件