<style>
.content{margin:40px auto;width:800px;}
.ke-toolbar {}
.ke-input-text {height:26px;font-size:14px;padding:5px;}
.ke-edit-textarea1{font-size:14px!important;padding:10px;}
.ke-icon-quote {background-image: url(/static/zy/kindeditor/plugins/quote/quote.png);width: 16px; height: 16px;}
.ke-icon-pp {background-image: url(/static/zy/kindeditor/plugins/quote/quote.png);width: 16px; height: 16px;}
.ke-dialog-body{overflow:auto;}
.line-numbers{white-space:pre-wrap!important}
.image-upload{margin:20px;}
.add-more-images{margin-left:80px;}
button{cursor:pointer;}
#fileInput{float:left;cursor:pointer;}
.preview{width:32%;height:140px;margin:1% 0.66% 1% 0.66%;float:left;}
.image-preview{padding:10px;}
.preview img{width:100%;height:140px;border-radius:4px}
.preview .delete-btn{top:-140px;position:relative;}
.muti{padding:20px;}
</style>
KindEditor.ready(function(K) {
csrftoken = document.getElementsByName("csrfmiddlewaretoken")[0].value;
window.editor = K.create('#editor',
{
resizeType:1,
filterMode:false,
//autoHeightMode:true,
//fixToolBar:true,
//allowImageRemote:false,
fontSizeTable:['9px', '10px', '12px', '14px', '16px', '18px', '24px'],
cssPath : ['/static/zy/kindeditor/my.css','/static/zy/kindeditor/plugins/code/prism.css'],
uploadJson : '/fuye/upload/',
extraFileUploadParams : {csrfmiddlewaretoken:csrftoken},
height:'700px',
width : '800px',
items : ['source', '|', 'undo', 'redo','preview', '|','formatblock', 'fontsize','code', '|', 'forecolor', 'hilitecolor', 'bold', 'quote', '|', 'image','table', 'link', 'unlink', 'clearhtml', 'fullscreen','pp'],
afterCreate: function() {
// 使用 highlight.js 对编辑器中的代码进行高亮处理
//hljs.highlightAll();
// html1=$("#editor").html();
//console.log(html1);
//this.html(html1);
//this.sync();
},
afterChange:function () {
//this.sync();
//this.html(html1);
//alert('sss');
//html1 = document.getElementById('editor1').innerHTML;
//html = this.html();
//document.getElementById('editor1').innerHTML = html;
//html1=$("#editor1").html();
//this.html(html1);
//console.log(html1);
},
});
});
KindEditor.lang({
quote : '引用',
pp:'查看',
});
</script>