fixes #940
[redakcja.git] / redakcja / static / js / wiki / view_editor_wysiwyg.js
index 92397b0..4e0bdee 100644 (file)
                     xml2html({
                         xml: '<' + nodeName + '>' + insertedText + '</' + nodeName + '>',
                         success: function(element){
-                            $origin.html($(element).html());
+                            if (nodeName == 'out-of-flow-text') {
+                                $(element).children().insertAfter($origin);
+                                $origin.remove()
+                            }
+                            else {
+                                $origin.html($(element).html());
+                            }
                             $overlay.remove();
                         },
                         error: function(text){