Committer: szhirkov
LJSUP-9917: Change text and use variable for list of sizesU trunk/cgi-bin/LJ/Widget/EntryForm.pm
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/EntryForm.pm 2011-09-28 04:54:23 UTC (rev 20152) +++ trunk/cgi-bin/LJ/Widget/EntryForm.pm 2011-09-28 05:08:26 UTC (rev 20153) @@ -1576,9 +1576,14 @@ insertPhotosData: $insert_photos_json, type: 'add' }) - .bind('htmlready', function (event, htmlOutput) { + .bind('htmlready', function (event) { if (window.switchedRteOn) { - CKEDITOR.instances.draft.insertHtml(htmlOutput); + var html = event.htmlStrings, + editor = CKEDITOR.instances.draft; + + for (var i = 0, l = html.length; i < l; i++) { + editor.insertElement(new CKEDITOR.dom.element.createFromHtml(html[i], editor.document)); + } } else { jQuery('#draft').val(jQuery('#draft').val() + htmlOutput); }