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类型。