isDirty = true;\r
});\r
- this.node.on('mouseover', '.rng', function(e) { $(e.target).addClass('rng-hover')});\r
- this.node.on('mouseout', '.rng', function(e) { $(e.target).removeClass('rng-hover')});\r
- this.node.on('click', '.rng', function(e) {\r
+ this.node.on('mouseover', '[wlxml-tag]', function(e) { $(e.target).addClass('rng-hover')});\r
+ this.node.on('mouseout', '[wlxml-tag]', function(e) { $(e.target).removeClass('rng-hover')});\r
+ this.node.on('click', '[wlxml-tag]', function(e) {\r
+ console.log('clicked node type: '+e.target.nodeType);\r
view._markSelected($(e.target));\r
});\r
\r
var anchor = $(window.getSelection().anchorNode);\r
if(anchor[0].nodeType === Node.TEXT_NODE)\r
anchor = anchor.parent();\r
- if(!anchor.hasClass('rng'))\r
+ if(!anchor.is('[wlxml-tag]'))\r
return;\r
view._markSelected(anchor);\r
});
return this.node.find('#rng-visualEditor-content').html();\r
}, \r
_markSelected: function(node) {\r
- this.node.find('.rng').removeClass('rng-current');\r
+ this.node.find('.rng-current').removeClass('rng-current');\r
node.addClass('rng-current');\r
}\r
};\r