编辑器KindEditor官网: http://www.kindsoft.net/
1、需要加载的JS和CSS文件为:
<script src="kindeditor-4.1.4/kindeditor.js" type="text/javascript" charset="utf-8"></script>
<script src="kindeditor-4.1.4/plugins/code/prettify.js" type="text/javascript"></script>
<link href="kindeditor-4.1.4/plugins/code/prettify.css" rel="stylesheet" type="text/css" />
2、编辑器初始化设置后,在里面加cssPath(注意路径)和prettyPrint(),这样在编辑器中插入的代码才有样式:
KindEditor.ready(function (K) {
window.EditorObject = K.create('#txtBody&