美文网首页
summernote 编辑器取值判断是否为空的isEmpty官方

summernote 编辑器取值判断是否为空的isEmpty官方

作者: microheng | 来源:发表于2018-12-05 15:39 被阅读0次
    var code = $('#summernote').code(),
        filteredContent = $(code).text().replace(/\s+/g, '');
    
    if(filteredContent.length > 0) {
        // content is not empty
    } else {
        // content is empty
    }
    

    summernote 编辑器取值判断是否为空的isEmpty官方的方法不起作用的解决办法

    相关文章

      网友评论

          本文标题:summernote 编辑器取值判断是否为空的isEmpty官方

          本文链接:https://www.haomeiwen.com/subject/imhwcqtx.html