1 /* 2 * CKEditor - The text editor for Internet - http://ckeditor.com 3 * Copyright (C) 2003-2008 Frederico Caldeira Knabben 4 * 5 * == BEGIN LICENSE == 6 * 7 * Licensed under the terms of any of the following licenses at your 8 * choice: 9 * 10 * - GNU General Public License Version 2 or later (the "GPL") 11 * http://www.gnu.org/licenses/gpl.html 12 * 13 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 14 * http://www.gnu.org/licenses/lgpl.html 15 * 16 * - Mozilla Public License Version 1.1 or later (the "MPL") 17 * http://www.mozilla.org/MPL/MPL-1.1.html 18 * 19 * == END LICENSE == 20 */ 21 22 // Remove the CKEDITOR.loadFullCore reference defined on ckeditor_basic. 23 delete CKEDITOR.loadFullCore; 24 25 CKEDITOR.instances = {}; 26 27 // Overwrite the basic _replaceElement implementation with the definitive one. 28 CKEDITOR.replace._replaceElement = function( textarea, config ) 29 { 30 // Encapsulates the original DOM textarea in a CKEDITOR.dom.element 31 // instance. 32 textarea = new CKEDITOR.dom.element( textarea ); 33 34 // Create the editor instance. 35 CKEDITOR.add( new CKEDITOR.editor( textarea, config ) ); 36 }; 37 38 CKEDITOR.add = function( editor ) 39 { 40 var name = editor.name; 41 42 // Abort it there is already an instance with that name. 43 if ( CKEDITOR.instances[ name ] ) 44 return; 45 46 CKEDITOR.instances[ name ] = editor; 47 48 CKEDITOR.fire( 'instancecreated', name, editor ); 49 editor.fireOnce( 'instancecreated' ); 50 }; 51 52 // Set the status to "loading", which means that the main CKEDITOR object has 53 // been created, and the rest is getting loaded. 54 CKEDITOR.status = 'loading'; 55 56 // Load the bootstrap script. 57 CKEDITOR.loader.load( 'core/_bootstrap' ); 58