PHP File Manager
Editing File: config.js
/** * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.editorConfig = function(config) { config.extraPlugins = 'imagepaste,youtube'; config.removePlugins = 'elementspath,scayt'; config.contentsCss = '/assets/css/site.css'; config.allowedContent = true; config.disableNativeSpellChecker = true; config.toolbar = [ { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] }, // { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, '/', { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] }, { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, { name: 'insert', items: [ 'Image', 'Youtube', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar', 'Iframe' ] }, '/', { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] }, { name: 'colors', items: [ 'TextColor', 'BGColor', 'Source' ] }, { name: 'others', items: [ '-' ] }, ]; // Toolbar groups configuration. config.toolbarGroups = [ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] }, { name: 'forms' }, '/', { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] }, { name: 'links' }, { name: 'insert' }, '/', { name: 'styles' }, { name: 'colors' }, { name: 'others' }, ]; config.filebrowserUploadUrl = '/upload/file'; config.filebrowserImageUploadUrl = '/upload/image'; config.removeDialogTabs = 'link:upload;image:upload'; config.filebrowserBrowseUrl = '/assets/fileman/index.html'; config.filebrowserImageBrowseUrl = '/assets/fileman/index.html?type=image'; }; CKEDITOR.on('instanceReady', function(e) { var editor = e.editor; editor.on('imagepaste.startUpload', function(e) { console.log("Uploading " + e.data.name + ", please wait..."); }); editor.on('imagepaste.endUpload', function(e) { if(e.data.ok) { console.log("File " + e.data.name + " uploaded correctly."); } else { console.log("Upload of " + e.data.name + " has failed."); } }); }); CKEDITOR.on('dialogDefinition', function(ev) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if(dialogName == 'table') { var info = dialogDefinition.getContents('info') info.get('txtWidth')['default'] = '100%'; info.get('txtBorder')['default'] = ''; info.get('txtCellSpace')['default'] = ''; info.get('txtCellPad')['default'] = ''; } // Check if the definition is from the dialog we're // interested on (the Link and Image dialog). if ( dialogName == 'link' || dialogName == 'image' ) { // remove Upload tab dialogDefinition.removeContents( 'Upload' ); } });
Cancel