Open siamkreative opened 10 years ago
Same thing for images: on a few templates, if the image URL is removed and you click another element without adding a new URL, it is impossible to go back to the image element.
Could eventually add a check for empty value. Something like this:
case 'img':
formControl.val($this.attr('src'));
formFieldWrap.find('.taed-helper > code').text($this.css('width'));
formControl.on('change keyup', function (e) {
e.preventDefault();
var value = $(this).val();
if (!value) {
btnSave.prop('disabled', true);
if (!$('.taed-helper-empty').length) {
$(this).nextAll('.taed-helper').after('<span class="taed-helper-empty">This can not be empty!</span>');
}
} else {
$('.taed-helper-empty').remove();
$(document).find('.taed-elem-active').attr('src', $(this).val());
$.fn.matchHeight._update();
}
});
break;
If you delete the content of the WYSIWYG, the "text area" disappears (it's actually still there) and I can't find a way to re-add content again. There is no more clickable area.
Maybe we need some kind of placeholder: create a style for empty elements.