X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/afdb8fd05511c5280e8ee251389cb893786eb810..c9355cb6a53e0fa130ebe8458f9bcda3ef0c4a50:/platforma/static/js/main.js?ds=inline diff --git a/platforma/static/js/main.js b/platforma/static/js/main.js index 8b55af96..d42af82b 100644 --- a/platforma/static/js/main.js +++ b/platforma/static/js/main.js @@ -328,8 +328,8 @@ function reverseTransform(editor, cont, errorCont, dontBlock) { $.blockUI({message: 'Åadowanie...'}); } setTimeout(function() { - html2xml({ - xml: serializer.serializeToString($('#html-view div').get(0)), + html2text({ + element: $('#html-view div').get(0), success: function(text) { editor.setCode(text); if (!dontBlock) { @@ -595,9 +595,9 @@ function html(element) { var serializer = new XMLSerializer(); - html2xml({ - xml: serializer.serializeToString($box[0]), - inner: true, + html2text({ + element: $box[0], + stripOuter: true, success: function(text) { $('textarea', $overlay).val($.trim(text)); @@ -616,7 +616,7 @@ function html(element) { xml2html({ xml: '<' + nodeName + '>' + insertedText + '' + nodeName + '>', success: function(element) { - $box.html($(element).html()); + $origin.html($(element).html()); $overlay.remove(); }, error: function(text) { @@ -661,7 +661,7 @@ function html(element) { } if (editable.is('.annotation-inline-box')) { $('*[x-annotation-box]', editable) - .css({width: 300, position: 'absolute', left: event.clientX - editable.offset().left + 5, top: event.clientY - editable.offset().top + 5}) + .css({position: 'absolute', left: event.clientX - editable.offset().left + 5, top: event.clientY - editable.offset().top + 5}) .show(); } else { $('*[x-annotation-box]').hide(); @@ -715,7 +715,7 @@ function refreshHistory(callback){ +'