使用文本编辑器控件KindEditor渲染文本域页面显示

this.sync()同步KindEditor的值到textarea文本框

  editor.isEmpty()判断文本域是否是空

editer.text()获取文本域的值

//内容编辑器
var editor;
KindEditor.ready(function(K) {
var basePath = $(window.parent.document).find('#contextPath').val();
editor = K.create("#txt", {
uploadJson: basePath + '/mcrs-upload/mvc/fileupload/editorUpload.json',
width:620,
afterChange: function() {
this.sync();
ifrHeight();
}
});
}); var content = editor.isEmpty();
if(content){
dynamicAlert(message.serviceCenter.contentIsNotNull, message.defaults.tipTitle);
return;
}
if(editor.text().length > 200){
dynamicAlert(message.news.contentMaxlength, message.defaults.tipTitle);
return;
}

官网:http://kindeditor.net/demo.php

最新文章

  1. Module-Zero之组织单元(OU)管理【新增】
  2. 【Python】Django
  3. Calculator(1.0)
  4. spring源码分析之spring-core asm概述
  5. Leetcode Sqrt(x)
  6. 【原】Linux Raid 实验
  7. c++ 复习练习
  8. spring中的Log4jConfigListener作用和webapp.root的设置
  9. c编码-2
  10. python使用简单http协议来传送文件
  11. 12.allegro环境设置[原创]
  12. CoreText实现图文混排之点击事件
  13. 帝国cms <!--list.var1-->,<!--list.var2-->的终极用法
  14. zalenium 应用
  15. Cocoa层粒子发射器动画添加多个cell的一种重构
  16. linux shell bash使用管道|和read结合时问题解决
  17. Linux挖矿病毒 khugepageds详细解决步骤
  18. window.load 和$(document).ready() 、window.load和body onload区别
  19. linux下在线升级nodejs
  20. JS实现值复制

热门文章

  1. glog入门demo
  2. 笔记本u盘插上不显示
  3. springboot之json传参(后台控制层如何接收和解析参数)
  4. [JSOI2016]最佳团体 DFS序/树形DP
  5. Visibility Graph Analysis of Geophysical Time Series: Potentials and Possible Pitfalls
  6. 第二篇,前端高性能JavaScript优化
  7. FineUIPro/Mvc/Core v6.1.0 发布了!
  8. Lombok(浅看,自用)
  9. AcWing 285. 没有上司的舞会
  10. lua 随机数 math.random()和math.randomseed()用法