1.首先引入kindedietor框架:
<script charset="utf-8"src="../kindeditor/kindeditor-all.js"></script>
<script charset="utf-8"src="../kindeditor/lang/zh-CN.js"></script>
2.编写<textArea id=”area”></textArea>标签
3.编写<script type=”text/javaScript”></script>引入kindeditor。
<script type=”text/javaScript”>
var editor;
KindEditor.ready(function(K) {
![]() ![]() ![]() ![]()
|
editor = K.create('#content', {
afterBlur:function(){
this.sync();
}
});
});
//获取<textare>标签的值,
这里用jquery的方式获取
varvalue_content =$('#content').val();
</script>