ThemeAvenue / BetterOptin

BetterOptin is a free exit intent popup plugin for WordPress.
https://betteropt.in
GNU General Public License v2.0
4 stars 1 forks source link

[Live Editor] Deleting the text content makes the textarea impossible to edit #5

Open siamkreative opened 10 years ago

siamkreative commented 10 years ago

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.

siamkreative commented 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.

siamkreative commented 8 years ago

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;