diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index 71b5efde7..75b994748 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -26,6 +26,7 @@ define(['backbone', './ComponentView'], comps.reset(null, opts); comps.add(this.$el.html(), opts); this.model.set('content', ''); + comps.trigger('resetNavigator'); this.render(); }, diff --git a/src/navigator/view/ItemsView.js b/src/navigator/view/ItemsView.js index 09a15c7ce..788b5fc17 100644 --- a/src/navigator/view/ItemsView.js +++ b/src/navigator/view/ItemsView.js @@ -12,8 +12,8 @@ define(['backbone','./ItemView'], this.sorter = o.sorter || {}; this.pfx = o.config.stylePrefix; this.parent = o.parent; - this.listenTo( this.collection, 'add', this.addTo ); - this.listenTo( this.collection, 'reset', this.render ); + this.listenTo(this.collection, 'add', this.addTo); + this.listenTo(this.collection, 'reset resetNavigator', this.render); this.className = this.pfx + 'items'; if(!this.parent) diff --git a/src/parser/config/config.js b/src/parser/config/config.js index 6f7697c02..980cba95d 100644 --- a/src/parser/config/config.js +++ b/src/parser/config/config.js @@ -4,4 +4,4 @@ define(function () { textTags: ['br', 'b', 'i', 'u'], }; -}); \ No newline at end of file +}); diff --git a/src/parser/model/ParserHtml.js b/src/parser/model/ParserHtml.js index 994174f2c..9efa7f66f 100644 --- a/src/parser/model/ParserHtml.js +++ b/src/parser/model/ParserHtml.js @@ -145,18 +145,16 @@ define(function(require) { */ // Check if it's a text node and if it could be moved to the prevous model + /* if(c.textTags.indexOf(model.tagName) >= 0){ if(prevIsText){ prevSib.content += node.outerHTML; continue; }else{ - model = { - type: 'text', - tagName: TEXT_NODE, - content: node.outerHTML, - }; + console.log(model); + model = { type: 'text', tagName: TEXT_NODE, content: node.outerHTML,}; } - } + }*/ // If tagName is still empty and is not a textnode, do not push it if(!model.tagName && model.type != 'textnode')