Ticket #3430: 3430.patch
File 3430.patch, 2.7 KB (added by , 14 years ago) |
---|
-
_source/core/config.js
153 153 plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,save,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', 154 154 155 155 /** 156 * List of additional plugins to be loaded. This is a tool setting which 157 * makes it easier to add new plugins, whithout having to touch and 158 * possibly breaking the <i>plugins</i> setting. 159 * @type String 160 * @example 161 * config.addPlugins = 'myplugin,anotherplugin'; 162 */ 163 addPlugins : '', 164 165 /** 166 * List of plugins that must not be loaded. This is a tool setting which 167 * makes it easier to avoid loading plugins definied in the <i>plugins</i> 168 * setting, whithout having to touch and possibly breaking it. 169 * @type String 170 * @example 171 * config.removePlugins = 'elementspath,save,font'; 172 */ 173 removePlugins : '', 174 175 /** 156 176 * The editor tabindex value. 157 177 * @type Number 158 178 * @default 0 (zero) -
_source/core/editor.js
35 35 36 36 var loadedConfig = loadConfigLoaded[ customConfig ] || ( loadConfigLoaded[ customConfig ] = {} ); 37 37 38 39 38 // If the custom config has already been downloaded, reuse it. 40 39 if ( loadedConfig.fn ) 41 40 { … … 149 148 150 149 var loadPlugins = function( editor ) 151 150 { 151 var config = editor.config, 152 plugins = config.plugins, 153 addPlugins = config.addPlugins, 154 removePlugins = config.removePlugins; 155 156 if ( addPlugins ) 157 { 158 // Remove them first to avoid duplications. 159 var removeRegex = new RegExp( '(?:^|,)(?:' + addPlugins.replace( /\s*,\s*/g, '|' ) + ')(?=,|$)' , 'g' ); 160 plugins = plugins.replace( removeRegex, '' ); 161 162 plugins += ',' + addPlugins; 163 } 164 165 if ( removePlugins ) 166 { 167 removeRegex = new RegExp( '(?:^|,)(?:' + removePlugins.replace( /\s*,\s*/g, '|' ) + ')(?=,|$)' , 'g' ); 168 plugins = plugins.replace( removeRegex, '' ); 169 } 170 152 171 // Load all plugins defined in the "plugins" setting. 153 CKEDITOR.plugins.load( editor.config.plugins.split( ',' ), function( plugins )172 CKEDITOR.plugins.load( plugins.split( ',' ), function( plugins ) 154 173 { 155 174 // The list of plugins. 156 175 var pluginsArray = [];