X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/21cd91531dd9c6e88d00da03f6b2f3ad88fb0da0..fe80e8a58ec02f2ee7f69cbf0f8daa3efea85be8:/src/wlxml/wlxml.js diff --git a/src/wlxml/wlxml.js b/src/wlxml/wlxml.js index b3783af..a320da3 100644 --- a/src/wlxml/wlxml.js +++ b/src/wlxml/wlxml.js @@ -161,7 +161,11 @@ $.extend(WLXMLDocument.prototype, { ElementNodeFactory: WLXMLElementNode, loadXML: function(xml) { smartxml.Document.prototype.loadXML.call(this, xml, {silent: true}); - $(this.dom).find(':not(iframe)').addBack().contents() + this.trigger('contentSet'); + }, + + normalizeXML: function(nativeNode) { + $(nativeNode).find(':not(iframe)').addBack().contents() .filter(function() {return this.nodeType === Node.TEXT_NODE;}) .each(function() { var el = $(this), @@ -243,7 +247,6 @@ $.extend(WLXMLDocument.prototype, { /* globals document */ el.replaceWith(document.createTextNode(text.transformed)); }); - this.trigger('contentSet'); }, registerClassTransformation: function(Transformation, className) {