Ext中CKEditor应用事例

本文介绍如何在ExtJS框架中使用CKEditor富文本编辑器,并提供了具体的配置示例。文章强调了CKEditor的强大功能及其相对于ExtJs自带htmleditor的优势。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CKEditor是一个出色的所见即所得的富文本编辑器,相比ExtJs原生的htmleditor要  强大很多。

 

1.Ext中JS调用代码事例:

items:[{
	 xtype : 'ckeditor',
	 fieldLabel : '内容',
	 width : '80%',
	 id : 'content',
	 name : 'content',
	 CKConfig : {
	 /*
	 * Enter your CKEditor config paramaters here or
	 * define a custom CKEditor config file.
	 */
	 customConfig : '/WebRoot/widgets/ckeditor/ckeditor/config.js',
	 toolbar : 'Full', // Full
	 toolbar : [
	 ['Templates', 'RemoveFormat', 'Bold',
	 'Italic', 'Underline',
	 'Strike', '-', 'Subscript',
	 'Superscript'],
	 ['NumberedList', 'BulletedList', '-'],
	 ['JustifyLeft', 'JustifyCenter',
	 'JustifyRight', 'JustifyBlock'],
	 ['Link', 'Unlink', 'Image', 'Flash',
	 'Table', 'HorizontalRule'],
	 ['Styles', 'Format', 'Font', 'FontSize'],
	 ['TextColor']],
	 skin : 'office2003',
	 resize_enabled : false,
	 bodyId : 'content'
		 }						 
}]

 注意点:1.config.js文件的获取采用绝对路径。

                 2.后台content的数据库字段类型应为clob类型。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值