X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/3a7f4250d94166111e423167275d558b48a2712f..bedc5daf8a42c50c84b8c43b5924c10d07ed0b3a:/modules/documentCanvas/canvas/canvas.js diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index 4344730..90dac8c 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -61,9 +61,8 @@ $.extend(Canvas.prototype, { } } - var wrapper = documentElement.DocumentTextElement.create({text: this.data}); - $(this).before(wrapper.dom()); - $(this).remove(); + var element = documentElement.DocumentTextElement.create({text: this.data}); + $(this).replaceWith(element.dom()); }); this.d = wrapper.children(0);