CKEditor 提速:禁用拼写检查
ckeditor 的自动拼写检查功能(通过与svn.spellchecker.net网站交互完成),使得 ckeditor 的装载非常的慢,有时显得录入反应相当的慢。拼写检查对于中文是多余了,所以可以把此功能屏蔽掉。官方网站的说法是 Scayt' (spell checker as yout type)
修改 ckeditor_3.3.1\config.js ( 以此版本为例 )
CKEDITOR.editorConfig = function( config )
{
......
config.disableNativeSpellChecker = false ;
config.scayt_autoStartup = false;
......
};
下面是官网对这两个参数的说明( docs.cksource.com
):
参数 disableNativeSpellChecker 的说明
:
Disables the built-in spell checker while typing natively available in the
browser (currently Firefox and Safari only).
Even if word suggestions will not appear in the CKEditor context menu, this
feature is useful to help quickly identifying misspelled words.
This setting is currently compatible with Firefox only due to limitations in
other browsers.
参数 scayt_autoStartup 的说明
:
If enabled (true), turns on SCAYT automatically after loading the editor.
CKEditor 增加字体:
修改ckeditor\config.js
CKEDITOR.editorConfig = function( config )
{
config.font_names = '宋体/宋体;黑体/黑体;仿宋/仿宋_GB2312;楷体/楷体_GB2312;隶书/隶书;幼圆/幼圆;'+ config.font_names ;
};
其中,楷体/楷体_GB2312,表示在ckeditor中的字体显示名称为“楷体”,系统字体名称为“楷体_GB2312”。
CKEditor 添加自定义字体:
修改ckeditor\config.js
config.contentsCss = 'fonts.css';
// 添加新的字体到 CKEditor 的字体列表
config.font_names = 'fontnametodisplay/yourfontname;' + config.font_names;
在 fonts.css 中添加@font-face 属性:
@font-face {
font-family: "yourfontname";
src: url( ../fonts/font.eot ); /* IE */
src: local("realfontname"), url("../fonts/font.TTF") format("truetype"); /*non-IE*/
}
CKEditor 存值/取值(客户端)
设置值:
// 修改内容
CKEDITOR.instances.content.setData( '编辑的文字' );
// 插入图片
CKEDITOR.instances.content.insertHtml("<img src=...>");
读取值:
var txt = CKEDITOR.instances.content.getData( );
参考:
CKEditor/FCKEditor取值 赋值
IE7/8下报错:存储空间不足,无法完成此操作
在IE下打开使用 ckeditor 的页面时 IE 报错:存储空间不足,无法完成此操作( Not enough storage is available to complete this operation)。
原因之一是因为 ckeditor 如果可能的话就使用 IE 指定文档.createStyleSheet ,但不幸的是,如果样式表超过31的话,它就会出错。
解决办法:合并样式。例如,在 joomla 中或 drupal 中,打开样式合并功能开关。也可以在 js 文件中查找 .createStyleSheet 修改相应的代码来解决。
// 原代码
if(this.$.createStyleSheet)this.$.createStyleSheet(k)
// 替换为
if(false)this.$.createStyleSheet(k)
参考:Another IE surprise
, Not enough storage error in IE7/IE8
分享到:
相关推荐
ckeditor ckfinder php精简版3.3.1 ckeditor ckfinder php精简版3.3.1
ckeditor+ckfinder精简版 ckeditor+ckfinder精简版 ckeditor+ckfinder精简版
CKeditor CKfinder 整合方案,清晰明了,供给有需要的伙伴!
Ckeditor ckfinder2.0.1超强整合 完整版 实践版 PHP 速有实例
CKEditor和CKFinder在ASP.NET的应用和演示文档。 CKEditor和CKFinder在ASP.NET项目中安装,配置和使用详解。 http://write.blog.csdn.net/postedit/22868963
Ckeditor与ckfinder整合forJAVA(支持文件上传) 详细配置文档 有图例 适用4.0版本配置
ckeditor、ckfinder整合教程
文本编辑器ckeditor ckfinder的使用(VS2010,若出现配置文件错误,请把 targetFramework="4.0"删除或者把程序转换为较低版本的framework)
关于springmvc、ckeditor、ckfinder三者整合
已经将ckeditor4.2+ckfinder2.3.1功能整合到一起。直接将js文件夹复制到web项目中即可。
使用JSP实现在线编辑器,内容包括开发文档,配套源代码,ckeditor_4.1.1_full.zip和ckfinder_java_2.3.1.zip开发包。从如何下载开发包到实现CKeditor Ckfinder融合实现在线编辑器(代码已解决中文图片传输问题),...
ckeditor与ckfinder(java版)整合详细流程 实现了图片的上传功能
Ckeditor ckfinder2.0.1超强整合 完整版 实践版 PH
C#版 富文本编辑器_ckEditor与ckFinder 源码,附小例子。支持文本编辑和图片上传。
1、下载asp版本的ckfinder,放到ckeditor目录下 2、修改ckeditor\config.js,加上如下内容: CKEDITOR.editorConfig = function( config ) { config.scayt_autoStartup = false config.language = 'zh-cn'; //中文 ...
ckeditor + ckFinder asp utf版,可用
本人建站经验总结,绝对可用,适合新手或者不熟悉CKEditor和CKFinder的,step by step傻瓜式。 此文档仅供研究学习使用,请勿用于商业目的,请在下载后24小时内删除!如果喜欢CKFinder请购买正版软件。 CKFinder ...
ckeditor4+ckfinder3.1组合,里面已作PHP初步配置,这是本人花了一上午时间搞定的.(已去除域名限制,有条件的朋友请资助下ckeditor项目组)
整合ckfinder 的图片上传功能到ckeditor中。可以利用ckfinder上传图片在ckeditor中使用。
CKEditor3.5.2的PHP版,并且整合了CKfinder