kindoreditor上传图片

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>ImageDialog Examples</title>
<link rel="stylesheet" href="../themes/default/default.css" />
<script src="../kindeditor.js"></script>
<script src="../lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor = K.editor({
allowFileManager : true
});
K('#image3').click(function() {
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
imageUrl : K('#url3').val(),
clickFn : function(url, title, width, height, border, align) {
K('#url3').val(url);
editor.hideDialog();
}
});
});
});
});
</script>
</head>
<body>

<p><input type="text" id="url3" value="" /> <input type="button" id="image3" value="选择图片" />(本地上传)</p>
</body>
</html>

我看着,kindeditor是使用ajax异步上传图片机制,返回上传文件路径,upload_json.php是原生的php上传代码,用着还可以。

原文地址:https://www.cnblogs.com/liuwenbohhh/p/4414073.html