This commit is contained in:
vitalets
2013-09-30 23:07:45 +04:00
parent af4e7c148e
commit 9678bd8c22
17 changed files with 1597 additions and 139 deletions

@ -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();
}
}
});