jsp中ckeditor的运用实例及配置?ckeditor是fckeditor的下一代版本,下面就来说下ckeditor的使用吧!要使用ck
jsp中ckeditor的运用实例及配置
?
ckeditor是fckeditor的下一代版本,下面就来说下ckeditor的使用吧!
要使用ckeditor,当然首先就是去http://ckeditor.com/?(ckeditor网站)下载ckeditor的压缩包.
ckeditor 的官方网站是?http://ckeditor.com/?,当前使用的版本是v3.0.1。
一、使用方法:
1、在页面<head>中引入ckeditor核心文件ckeditor.js
?
?
2、在使用编辑器的地方插入HTML控件<textarea>
?
3、将相应的控件替换成编辑器代码
?
?
二、 一些使用技巧
1、在页面中即时设置编辑器
<script type="text/javascript">
//示例1:设置工具栏为基本工具栏,高度为70
?
CKEDITOR.replace( 'editor1', { toolbar : [//加粗 斜体, 下划线 穿过线 下标字 上标字 ['Bold','Italic','Underline','Strike','Subscript','Superscript'],//数字列表 实体列表 减小缩进 增大缩进 ['NumberedList','BulletedList','-','Outdent','Indent'],//左对齐 居中对齐 右对齐 两端对齐 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],//超链接 取消超链接 锚点 ['Link','Unlink','Anchor'],//图片 flash 表格 水平线 表情 特殊字符 分页符 ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],'/',//样式 格式 字体 字体大小 ['Styles','Format','Font','FontSize'],//文本颜色 背景颜色 ['TextColor','BGColor'],//全屏 显示区块 ['Maximize', 'ShowBlocks','-'] ] } );</script>?
三、精简ckeditor
??? 在部署到Web服务器上时,下列文件夹和文件都可以删除:
??? /_samples :示例文件夹;
??? /_source :未压缩源程序;
??? /lang文件夹下除 zh-cn.js、en.js 以外的文件(也可以根据需要保留其他语言文件);
??? 根目录下的 changes.html(更新列表),install.html(安装指向),license.html(使用许可);
??? /skins 目录下不需要的皮肤,一般用V2(简单,朴素) ,如果只保留V2则必须在config.js中指定皮肤
