X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fckeditor_basic.js;h=239aca022b768f0692fd7c4bce3d63b937e2ed89;hb=refs%2Ftags%2Fv3.3.1;hp=76b8f0142acbbb7975edb549f8517007a8569cc5;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/core/ckeditor_basic.js b/_source/core/ckeditor_basic.js index 76b8f01..239aca0 100644 --- a/_source/core/ckeditor_basic.js +++ b/_source/core/ckeditor_basic.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -79,7 +79,7 @@ if ( CKEDITOR.status == 'unloaded' ) */ CKEDITOR.replaceByClassEnabled = true; - var createInstance = function( elementOrIdOrName, config, creationFunction ) + var createInstance = function( elementOrIdOrName, config, creationFunction, data ) { if ( CKEDITOR.env.isCompatible ) { @@ -87,7 +87,7 @@ if ( CKEDITOR.status == 'unloaded' ) if ( CKEDITOR.loadFullCore ) CKEDITOR.loadFullCore(); - var editor = creationFunction( elementOrIdOrName, config ); + var editor = creationFunction( elementOrIdOrName, config, data ); CKEDITOR.add( editor ); return editor; } @@ -125,15 +125,16 @@ if ( CKEDITOR.status == 'unloaded' ) * @param {Object} [config] The specific configurations to apply to this * editor instance. Configurations set here will override global CKEditor * settings. + * @param {String} [data] Since 3.3. Initial value for the instance. * @returns {CKEDITOR.editor} The editor instance created. * @example * <div id="editorSpace"><:/div> * ... * CKEDITOR.appendTo( 'editorSpace' ); */ - CKEDITOR.appendTo = function( elementOrId, config ) + CKEDITOR.appendTo = function( elementOrId, config, data ) { - return createInstance( elementOrId, config, CKEDITOR.editor.appendTo ); + return createInstance( elementOrId, config, CKEDITOR.editor.appendTo, data ); }; /** @@ -186,7 +187,7 @@ if ( CKEDITOR.status == 'unloaded' ) // The textarea class name could be passed as the function // parameter. - var classRegex = new RegExp( '(?:^| )' + arguments[0] + '(?:$| )' ); + var classRegex = new RegExp( '(?:^|\\s)' + arguments[0] + '(?:$|\\s)' ); if ( !classRegex.test( textarea.className ) ) continue;