Ticket #5162: 5162.patch
File 5162.patch, 1.7 KB (added by , 13 years ago) |
---|
-
_samples/ajax.html
27 27 var html = document.getElementById( 'editorcontents' ).innerHTML; 28 28 29 29 // Create a new editor inside the <div id="editor"> 30 editor = CKEDITOR.appendTo( 'editor' ); 31 editor.setData( html ); 30 editor = CKEDITOR.appendTo( 'editor' , { on:{'instanceReady':function(e) { e.editor.setData( html, null, false )} } }); 32 31 33 32 // This sample may break here if the ckeditor_basic.js is used. In such case, the following code should be used instead: 34 33 /* -
_source/core/editor.js
564 564 var element = this.element; 565 565 if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) 566 566 data = element.is( 'textarea' ) ? element.getValue() : element.getHtml(); 567 else 568 data = ''; 567 569 } 568 570 569 571 return data; … … 582 584 * 583 585 * @param {String} data HTML code to replace the curent content in the editor. 584 586 * @param {Function} callback Function to be called after the setData is completed. 585 * @param {Boolean} noUndo Specify false to avoid editor from creating undo snapshot for this load. 587 * @param {Boolean} noUndo Specify false to avoid editor from creating undo snapshot for this load. 586 588 * @example 587 589 * CKEDITOR.instances.editor1.<b>setData( '<p>This is the editor data.</p>' )</b>; 588 590 * CKEDITOR.instances.editor1.setData( '<p>Some other editor data.</p>', function()