handleEmpty checks only html by default, excluding wysihtml5, refers to ,

This commit is contained in:
vitalets
2013-09-22 00:11:37 +04:00
parent 3166073666
commit 207f30b266
3 changed files with 41 additions and 9 deletions
src
element
inputs-ext
wysihtml5
test/unit

@ -87,6 +87,17 @@ $(function(){
activate: function() {
this.$input.data("wysihtml5").editor.focus();
},
isEmpty: function($element) {
if($.trim($element.html()) === '') {
return true;
} else if($.trim($element.text()) !== '') {
return false;
} else {
//e.g. '<img>', '<br>', '<p></p>'
return !$element.height() || !$element.width();
}
}
});