Kaynağa Gözat

编辑器判断

layui
yirenyishi 6 yıl önce
ebeveyn
işleme
e55f8ac306
  1. 1
      static/css/newblog.css
  2. 2
      views/newblog.html
  3. 2
      views/note.html

1
static/css/newblog.css

@ -4,6 +4,7 @@
line-height: 50px;
}
.blog-title input{
padding-left: 12px;
flex: 1;
height: 44px;
border: 0;

2
views/newblog.html

@ -61,7 +61,7 @@
return
}
tobj.title = $("#blog-title").val();
if (editor.txt.text().trim().length == 0) {
if (editor.txt.html().trim().length == 0) {
layer.msg('文章内容不能为空哦', function () {
});
return

2
views/note.html

@ -116,7 +116,7 @@
return
}
var noteHtml = editor.txt.html()
if (!editor.txt.text() && editor.txt.text().trim().length == 0) {
if (!editor.txt.html() && editor.txt.html().trim().length == 0) {
layer.msg('保存内容为空', function () {
});
return

Yükleniyor…
İptal
Kaydet