js中的文本编辑器控件KindEditor
2024-09-06 10:42:52
使用文本编辑器控件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
最新文章
- Module-Zero之组织单元(OU)管理【新增】
- 【Python】Django
- Calculator(1.0)
- spring源码分析之spring-core asm概述
- Leetcode Sqrt(x)
- 【原】Linux Raid 实验
- c++ 复习练习
- spring中的Log4jConfigListener作用和webapp.root的设置
- c编码-2
- python使用简单http协议来传送文件
- 12.allegro环境设置[原创]
- CoreText实现图文混排之点击事件
- 帝国cms <;!--list.var1-->;,<;!--list.var2-->;的终极用法
- zalenium 应用
- Cocoa层粒子发射器动画添加多个cell的一种重构
- linux shell bash使用管道|和read结合时问题解决
- Linux挖矿病毒 khugepageds详细解决步骤
- window.load 和$(document).ready() 、window.load和body onload区别
- linux下在线升级nodejs
- JS实现值复制
热门文章
- glog入门demo
- 笔记本u盘插上不显示
- springboot之json传参(后台控制层如何接收和解析参数)
- [JSOI2016]最佳团体 DFS序/树形DP
- Visibility Graph Analysis of Geophysical Time Series: Potentials and Possible Pitfalls
- 第二篇,前端高性能JavaScript优化
- FineUIPro/Mvc/Core v6.1.0 发布了!
- Lombok(浅看,自用)
- AcWing 285. 没有上司的舞会
- lua 随机数 math.random()和math.randomseed()用法