return wrapperElement;
},
getDocumentElement: function(from) {
- if(from instanceof HTMLElement) {
+ if(from instanceof HTMLElement || from instanceof Text) {
return documentElement.wrap(from, this);
}
},
});
},
extractItems: function(params) {
+ params = _.extend({merge: true}, params);
var list = params.element1.parent();
if(!list.is('list') || !(list.sameNode(params.element2.parent())))
return false;
reference.after(toAdd);
}
+ if(!params.merge && listIsNested) {
+ return this.extractItems({element1: extractedItems[0], element2: extractedItems[extractedItems.length-1]});
+ }
+ return true;
},
areItemsOfTheSameList: function(params) {
var e1 = params.element1,