JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2.1
[ckeditor.git] / _samples / ajax.html
index 0cd8ce8..153e546 100644 (file)
@@ -22,22 +22,9 @@ function createEditor()
 \r
        var html = document.getElementById( 'editorcontents' ).innerHTML;\r
 \r
-       // Create a new editor inside the <div id="editor">\r
-       editor = CKEDITOR.appendTo( 'editor' );\r
-       editor.setData( html );\r
-\r
-       // This sample may break here if the ckeditor_basic.js is used. In such case, the following code should be used instead:\r
-       /*\r
-       if ( editor.setData )\r
-               editor.setData( html );\r
-       else\r
-       {\r
-               CKEDITOR.on( 'loaded', function()\r
-                       {\r
-                               editor.setData( html );\r
-                       });\r
-       }\r
-       */\r
+       // Create a new editor inside the <div id="editor">, setting its value to html\r
+       var config = {};\r
+       editor = CKEDITOR.appendTo( 'editor', config, html );\r
 }\r
 \r
 function removeEditor()\r