X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ba1e24e73cbeef44c1a08c8d225cc12923f3dfd6..76d0577287f1e82bb9375e640187a91723617ef9:/src/smartxml/smartxml.js diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 1686abd..248333e 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -133,8 +133,13 @@ $.extend(ElementNode.prototype, DocumentNode.prototype, { element1: parent.contents()[myIdx + (moveLeftRange ? -1 : 0)], element2: parent.contents()[myIdx + childrenLength-1 + (moveRightRange ? 1 : 0)] }; - } + }, + toXML: function() { + var wrapper = $('
'); + wrapper.append(this._$); + return wrapper.html(); + } }); var TextNode = function(nativeNode, document) { @@ -180,6 +185,10 @@ $.extend(Document.prototype, { createTextNode: function(nativeNode) { return new this.TextNodeFactory(nativeNode, this); + }, + + toXML: function() { + return this.root.toXML(); } });