使用ckeditor
安装插件:
compile ":ckeditor:4.5.4.0"
在config.groovy中增加如下内容:
ckeditor {config = "/js/myckconfig.js"skipAllowedItemsCheck = falsedefaultFileBrowser = "ofm"upload {basedir = "/uploads/"overwrite = falselink {browser = falseupload = trueallowed = []denied = ['html', 'htm', 'php', 'php2', 'php3', 'php4', 'php5','phtml', 'pwml', 'inc', 'asp', 'aspx', 'ascx', 'jsp','cfm', 'cfc', 'pl', 'bat', 'exe', 'com', 'dll', 'vbs', 'js', 'reg','cgi', 'htaccess', 'asis', 'sh', 'shtml', 'shtm', 'phtm']}p_w_picpath {browser = trueupload = trueallowed = ['jpg', 'gif', 'jpeg', 'png']denied = []}flash {browser = falseupload = trueallowed = ['swf']denied = []}}
}
复制下面的内容,保存到/web-app/js,命名为:myckconfig.js
/*** @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.* For licensing, see LICENSE.html or http://ckeditor.com/license*/CKEDITOR.editorConfig = function( config ) {// Define changes to default configuration here.// For complete reference see:// http://docs.ckeditor.com/#!/api/CKEDITOR.config// The toolbar groups arrangement, optimized for two toolbar rows.config.toolbarGroups = [{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },{ name: 'insert' },{ name: 'links' },{ name: 'styles' },{ name: 'colors' },{ name: 'about' }];// Remove some buttons provided by the standard plugins, which are// not needed in the Standard(s) toolbar.config.removeButtons = 'Underline,Subscript,Superscript';// Set the most common block elements.config.format_tags = 'p;h1;h2;h3;pre';// Simplify the dialog windows.config.removeDialogTabs = 'p_w_picpath:advanced;link:advanced';
};
在_form.gsp中,需要用的地方,改成这样
<ckeditor:resources/>
<div class="fieldcontain ${hasErrors(bean: news, field: 'content', 'error')} "><span class="property-label"><g:message code="news.content.label" default="Content"/></span><span class="property-value"><ckeditor:editor name="content" width="95%">${news?.content}</ckeditor:editor></span>
</div>
附件是改好的main.css,下载后将后缀.zip去掉即可
转载于:https://blog.51cto.com/xiaosa/1719744
使用ckeditor相关推荐
- php set medias,laravel5.1 -- Integrate FileManager and CKeditor into laravel
FileManager中文名叫文件管理器,也叫文件浏览器,它给我们提供了一个可视化的界面来管理文件和文件夹.利用FileManager,我们可以对文件进行浏览.增加.打印.修改(文件属性).重命名.搜 ...
- FCKeditor如何升级CKEditor及使用方法
之前编辑器用的是FCKeditor,因为项目原因需要升级为最新版本4.2.2,发现是已经更名为CKEditor. 百度了一下,据官方的解释,CK是对FCK的代码的完全重写. 项目环境是asp.net的 ...
- Ueditor和CKeditor 两款编辑器的使用与配置
一丶ueditor 百度编辑器 1.官方文档,演示,下载地址:http://ueditor.baidu.com/website/index.html 2.百度编辑器的好:Editor是由百度web前端 ...
- ckeditor finder php,CKEDITOR CKFINDER的图片上传配置(C#/asp.net/php)
CKEDITOR+CKFINDER的图片上传配置(C#/asp教程.net/php教程) php keditor的代码全部重写,但里面没有了上传功能,只是一个纯粹的文件在线编辑器,如果需要上传图片,还 ...
- Ckeditor通过Ajax更新数据
之前在表单中对ckeditor的赋值就直接是 $("#theadEditor").val(result); 而如今我想通过点击不同选项来使用Ajax在后台訪问数据.对ckedito ...
- 12.HTML编辑器(CKEditor、CKFinder集成)
CKEditor原名为FckEditor,是著名的HTML编辑器,可以在线编辑HTML内容. 配置参考文档:主要将ckeditor中的lang.plugins.skins.ckeditor.js.co ...
- CKEditor的安装与基本使用
http://blog.csdn.net/liananse/article/details/6320617 CKEditor的安装与基本使用(JSP) 文章分类:Web前端 一.下载CKEditor ...
- ckeditor富文本编辑器的基本配置设置:
原文地址:http://blog.csdn.net/wei365456yin/article/details/54618970?locationNum=5&fps=1 1.首先下载ckedit ...
- CKeditor 配置使用
CKeditor 配置使用 一.使用方法: 1.在页面<head>中引入ckeditor核心文件ckeditor.js <script type="text/javascr ...
最新文章
- Linux下开发优秀链接
- STL源代码分析(ch 1)组态2
- boost::fusion::find_if用法的测试程序
- 【学习总结】《大话数据结构》- 总
- android中的websocket 应用
- 【linux】安装centOS过程中遇到的困难
- Java基础学习总结(116)——Map使用相关问题总结
- 跟着李开复去硅谷,你有疑惑我帮问 | 互动一则
- 《云计算:原理与范式》一3.4 SaaS范式面临的挑战
- linux系统下将php和mysql命令加入到环境变量中的方法
- 微信小程序用什么工具开发(微信小程序开发工具介绍)
- 笔记:C# log4net App.config 配置系统未能初始化问题的一种处理方法
- python调用鼠标驱动_python+selenium 鼠标事件操作方法
- matlab画收敛曲线,3.26 面收敛处理
- 网站卡死服务器2008,winserver2008r2频繁卡死?
- 哪个牌子的蓝牙耳机音质好?音质比较好的蓝牙耳机排名
- P2676 [USACO07DEC]Bookshelf B
- 通用编程c语言,STC单片机C语言通用万能编程.docx
- IOS获取UDID添加到开发者账号用来安装测试包
- dsp31段最佳调音图_DSP调音技术~DSP功放31段EQ详解~DSP调音师推荐