Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[livejournal] r20153: LJSUP-9917: Change text and use variable...

Committer: szhirkov
LJSUP-9917: Change text and use variable for list of sizes
U   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);
             }

Tags: aralot, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments