- },\r
-\r
- /**\r
- * Executes a JavaScript code into the current document.\r
- * @param {String} code The code to be executed.\r
- * @example\r
- * CKEDITOR.scriptLoader.loadCode( 'var x = 10;' );\r
- * alert( x ); // "10"\r
- */\r
- loadCode : function( code )\r
- {\r
- // Create the <script> element.\r
- var script = new CKEDITOR.dom.element( 'script' );\r
- script.setAttribute( 'type', 'text/javascript' );\r
- script.appendText( code );\r
-\r
- // Append it to <head>.\r
- script.appendTo( CKEDITOR.document.getHead() );\r