X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/35abf5d5c78b517329e313b1158f8b980940acd6..e5ac28c20d0e89d662c6fcf5da4ecc87f8011211:/modules/documentCanvas/canvas/documentElement.js diff --git a/modules/documentCanvas/canvas/documentElement.js b/modules/documentCanvas/canvas/documentElement.js index cd94759..530f854 100644 --- a/modules/documentCanvas/canvas/documentElement.js +++ b/modules/documentCanvas/canvas/documentElement.js @@ -38,6 +38,11 @@ $.extend(DocumentElement.prototype, { sameNode: function(other) { return other && (typeof other === typeof this) && other.$element[0] === this.$element[0]; + }, + + wrapWithNodeElement: function(wlxmlNode) { + this.$element.wrap($('<' + wlxmlNode.tag + ' class="' + wlxmlNode.klass + '"">')[0]); + return documentElementFromHTMLElement(this.$element.parent().get(0)); } });