fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wrapping document node and text element
[fnpeditor.git]
/
modules
/
documentCanvas
/
canvas
/
documentElement.js
diff --git
a/modules/documentCanvas/canvas/documentElement.js
b/modules/documentCanvas/canvas/documentElement.js
index
cd94759
..
530f854
100644
(file)
--- 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];
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));
}
});
}
});