config.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. CKEDITOR.editorConfig = function (config) {
  6. // Define changes to default configuration here. For example:
  7. // config.language = 'fr';
  8. // config.uiColor = '#AADC6E';
  9. // 图片上传配置
  10. config.image_previewText = ' '; // 清除图片预览的文字
  11. config.filebrowserImageUploadUrl = "../../../json/editor_ok.json"; // 图片上传url
  12. // 文件上传配置(音频、视频、flash等)
  13. config.filebrowserUploadUrl = "../../../json/editor_error.json"; // 文件上传url
  14. // 操作按钮布局配置
  15. config.toolbarGroups = [
  16. {name: 'document', groups: ['mode', 'document', 'doctools']},
  17. {name: 'clipboard', groups: ['clipboard', 'undo']},
  18. {name: 'editing', groups: ['find', 'selection', 'spellchecker', 'editing']},
  19. {name: 'forms', groups: ['forms']},
  20. {name: 'colors', groups: ['colors']},
  21. {name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
  22. {name: 'paragraph', groups: ['align', 'list', 'indent', 'blocks', 'bidi', 'paragraph']},
  23. {name: 'links', groups: ['links']},
  24. {name: 'insert', groups: ['insert']},
  25. {name: 'styles', groups: ['styles']},
  26. {name: 'tools', groups: ['tools']}
  27. ];
  28. // 移除的按钮
  29. config.removeButtons = 'Cut,Copy,Paste,PasteText,PasteFromWord,Anchor,ShowBlocks,CopyFormatting,RemoveFormat';
  30. };