设置:pasteType : 1 就可以了
pasteType函数,默认值是2,设置为1
粘贴类型:0(禁止粘贴),1(纯文本粘贴),2(HTML粘贴)
<link rel="stylesheet" href="/editor/themes/default/default.css" />
<script charset="utf-8" src="/editor/kindeditor-min.js"></script>
<script charset="utf-8" src="/editor/lang/en.js"></script>
<script>
KindEditor.ready(function(K) {
editor = K.create('textarea[name=<?php echo $ContentName ?>]', {
resizeType : 1,
pasteType : 1, //粘贴 没格式
allowPreviewEmoticons : false,
allowImageRemote:false, //网络图片关闭
allowImageUpload : true, //本地图片开启
afterBlur:function(){this.sync(); }, //失去焦点 将 kindeditor的值同步给textarea
items : [ 'removeformat', '|', 'image' ]
});
});
</script>
<textarea name="<?php echo $ContentName ?>" id="<?php echo $ContentName ?>" style="width:<?php echo $width ?>px;height:250px;visibility:hidden;"><?php echo htmlspecialchars($Content) ?></textarea>