ckeditor = function(textareaid,ctx) { CKEDITOR.context =ctx; //构造对像 var editor = CKEDITOR.replace(textareaid, { skin : 'office2003', height:300, toolbarCanCollapse : false, toolbarGroupCycling : true, toolbar : [ { name: 'basicstyles', items : ['Source', 'saveRule','Bold','Italic','Underline','Strike'] }, { name: 'styles', items : [ 'Font','FontSize' ] }, { name: 'colors', items : [ 'TextColor','BGColor' ] } ] }); return editor; };