六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 129|回复: 0

CKEditor用法

[复制链接]

升级  28%

22

主题

22

主题

22

主题

秀才

Rank: 2

积分
92
 楼主| 发表于 2013-2-7 20:20:01 | 显示全部楼层 |阅读模式
 
config.js

CKEDITOR.editorConfig = function( config ){// Define changes to default configuration here. For example:config.language = 'zh-cn';config.uiColor = '#AADC6E';config.width = '100%';config.height = '300px';config.skin = 'office2003';config.toolbar = 'Full';        config.toolbarCanCollapse = false;       //工具栏是否允许收缩        config.autoUpdateElement = true;         //当提交包含有此编辑器的表单时,是否自动更新元素内的数据config.fullPage = true;                              //允许html,head,link等标签        config.removePlugins = 'elementspath';   //去掉底部显示的标签        config.resize_enabled = true;                  //显示底部拖动编辑器大小图标                 //config.toolbar = 'Full';    config.toolbar = [        ['Cut','Copy','Paste','PasteText','PasteFromWord','Bold','Italic','Underline','Strike','Subscript','Superscript','TextColor','BGColor','Link','Unlink','Anchor'],    ['Styles','Format','Font','FontSize']    ];};     
  
html:
 
<script type="text/javascript" src="/ckeditor/ckeditor/ckeditor.js"></script> <textarea cols="80" id="htmlcontent" name="htmlcontent">$!htmlcontent</textarea><input name="htmleditor" type="hidden" value="fck"/><div id="fckeditorwrapper"><script type="text/javascript">         //动态设置语言,国际化      CKEDITOR.config.language = '${sessionScope.language}-${sessionScope.country}';      CKEDITOR.replace('htmlcontent');   </script>
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表