JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / core / ckeditor_basic.js
index 4a9383b..a2ef2cb 100644 (file)
@@ -29,7 +29,7 @@ if ( CKEDITOR.status == 'unloaded' )
                        // If not the basic code is not ready it, just mark it to be loaded.\r
                        if ( CKEDITOR.status != 'basic_ready' )\r
                        {\r
-                               CKEDITOR.loadFullCore._load = true;\r
+                               CKEDITOR.loadFullCore._load = 1;\r
                                return;\r
                        }\r
 \r
@@ -77,9 +77,9 @@ if ( CKEDITOR.status == 'unloaded' )
                 * // Disable the auto-replace feature.\r
                 * <b>CKEDITOR.replaceByClassEnabled</b> = false;\r
                 */\r
-               CKEDITOR.replaceByClassEnabled = true;\r
+               CKEDITOR.replaceByClassEnabled = 1;\r
 \r
-               var createInstance = function( elementOrIdOrName, config, creationFunction )\r
+               var createInstance = function( elementOrIdOrName, config, creationFunction, data )\r
                {\r
                        if ( CKEDITOR.env.isCompatible )\r
                        {\r
@@ -87,7 +87,7 @@ if ( CKEDITOR.status == 'unloaded' )
                                if ( CKEDITOR.loadFullCore )\r
                                        CKEDITOR.loadFullCore();\r
 \r
-                               var editor = creationFunction( elementOrIdOrName, config );\r
+                               var editor = creationFunction( elementOrIdOrName, config, data );\r
                                CKEDITOR.add( editor );\r
                                return editor;\r
                        }\r
@@ -125,21 +125,19 @@ if ( CKEDITOR.status == 'unloaded' )
                 * @param {Object} [config] The specific configurations to apply to this\r
                 *              editor instance. Configurations set here will override global CKEditor\r
                 *              settings.\r
+                * @param {String} [data] Since 3.3. Initial value for the instance.\r
                 * @returns {CKEDITOR.editor} The editor instance created.\r
                 * @example\r
                 * &lt;div id="editorSpace"&gt;&lt:/div&gt;\r
                 * ...\r
                 * <b>CKEDITOR.appendTo( 'editorSpace' )</b>;\r
                 */\r
-               CKEDITOR.appendTo = function( elementOrId, config )\r
+               CKEDITOR.appendTo = function( elementOrId, config, data )\r
                {\r
-                       return createInstance( elementOrId, config, CKEDITOR.editor.appendTo );\r
+                       return createInstance( elementOrId, config, CKEDITOR.editor.appendTo, data );\r
                };\r
 \r
-               /*\r
-                * @ignore\r
-                * Documented at ckeditor.js.\r
-                */\r
+               // Documented at ckeditor.js.\r
                CKEDITOR.add = function( editor )\r
                {\r
                        // For now, just put the editor in the pending list. It will be\r
@@ -173,9 +171,9 @@ if ( CKEDITOR.status == 'unloaded' )
 \r
                        for ( var i = 0 ; i < textareas.length ; i++ )\r
                        {\r
-                               var config = null;\r
-                               var textarea = textareas[i];\r
-                               var name = textarea.name;\r
+                               var config = null,\r
+                                       textarea = textareas[i],\r
+                                       name = textarea.name;\r
 \r
                                // The "name" and/or "id" attribute must exist.\r
                                if ( !textarea.name && !textarea.id )\r
@@ -186,7 +184,7 @@ if ( CKEDITOR.status == 'unloaded' )
                                        // The textarea class name could be passed as the function\r
                                        // parameter.\r
 \r
-                                       var classRegex = new RegExp( '(?:^| )' + arguments[0] + '(?:$| )' );\r
+                                       var classRegex = new RegExp( '(?:^|\\s)' + arguments[0] + '(?:$|\\s)' );\r
 \r
                                        if ( !classRegex.test( textarea.className ) )\r
                                                continue;\r