ckeditor_extend.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ckeditor = function(textareaid,ctx) {
  2. CKEDITOR.context =ctx;
  3. //构造对像
  4. var editor = CKEDITOR.replace(textareaid, {
  5. skin : 'office2003',
  6. toolbarCanCollapse : false,
  7. toolbarGroupCycling : true,
  8. extraPlugins:"img,attchment,video,readperson,sendperson,jumpurl",
  9. toolbar : [
  10. { name: 'document', items : [ 'Source','-','NewPage','DocProps','Preview','Print','-','Templates' ] },
  11. { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
  12. { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
  13. { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','-','RemoveFormat' ] },
  14. { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
  15. { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
  16. { name: 'insert', items : [ 'Flash','Table','HorizontalRule','Smiley','SpecialChar' ] },
  17. { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
  18. { name: 'colors', items : [ 'TextColor','BGColor' ] },
  19. { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','img','attchment', 'video','readperson','sendperson','jumpurl'] }
  20. ]
  21. });
  22. return editor;
  23. };