- var children = [];
- node.children().each(function() {
- var child = this;
- children.push({repr: child.getTag() + (child.getClass() ? ' / ' + child.getClass() : ''), id: child.getId()});
- nodes[child.getId()] = child;
+ var nodeChildren = nodeElement.children(),
+ children = [];
+ nodeChildren.forEach(function(child) {
+ if(child.getText) {
+ var text = child.getText();
+ if(text.length > 13)
+ text = text.substr(0,13) + '...';
+ children.push({repr: '"' + text + '"', bold: child.sameNode(textElement)});
+ } else {
+ children.push({repr: child.getWlxmlTag() + (child.getWlxmlClass() ? ' / ' + child.getWlxmlClass() : '')});
+ }