X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/70b1b491ce0fcdf036c97e381b8fc6867e06b3c2..2c4b75ac7d96858f3a50377b6ac680327eaa57ec:/modules/documentCanvas/canvas/documentElement.js diff --git a/modules/documentCanvas/canvas/documentElement.js b/modules/documentCanvas/canvas/documentElement.js index 4d74722..11e3471 100644 --- a/modules/documentCanvas/canvas/documentElement.js +++ b/modules/documentCanvas/canvas/documentElement.js @@ -74,7 +74,7 @@ $.extend(DocumentElement.prototype, { }, wrapWithNodeElement: function(wlxmlNode) { - var wrapper = DocumentNodeElement.create({tag: wlxmlNode.tag, klass: wlxmlNode.klass}); + var wrapper = DocumentNodeElement.create({tag: wlxmlNode.tag, klass: wlxmlNode.klass}, this); this.dom().replaceWith(wrapper.dom()); wrapper.append(this); return wrapper; @@ -103,6 +103,12 @@ $.extend(DocumentElement.prototype, { isVisible: function() { return this instanceof DocumentTextElement || this.getWlxmlTag() !== 'metadata'; + }, + + isInsideList: function() { + return this.parents().some(function(parent) { + return parent.is('list'); + }); } });