已找到高手解决,在此谢谢 “分享 stepday.com”
代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Simple Examples</title>
<style>
form
{
margin: 0;
}
textarea
{
display: block;
}
</style>
<link rel="stylesheet" href="../themes/default/default.css" />
<script charset="utf-8" src="../kindeditor.js"></script>
<script charset="utf-8" src="../lang/zh_CN.js"></script>
<script>
var editor;
KindEditor.ready(function (K) {
editor = K.create('textarea[name="content"]', {
cssPath : '../plugins/code/prettify.css',
uploadJson : '../asp/upload_json.asp',
resizeType: 1,
fullscreenMode: 0, //是否全屏显示
designMode: 1,
allowPreviewEmoticons: false,
allowImageUpload: true,
allowFileManager: true,
items: ["source", "|", "undo", "redo", "|", "preview", "print", "template", "code", "cut", "copy", "paste", "plainpaste", "wordpaste","|", "justifyleft", "justifycenter", "justifyright", "justifyfull", "insertorderedlist", "insertunorderedlist", "indent", "outdent", "subscript", "superscript", "clearhtml", "quickformat", "selectall", "|", "fullscreen", "/", "formatblock", "fontname", "fontsize", "|", "forecolor", "hilitecolor", "bold", "italic", "underline", "strikethrough", "lineheight", "removeformat", "|", "image", "multiimage", "flash", "media", "insertfile", "table", "hr", "emoticons", "baidumap", "pagebreak", "anchor", "link", "unlink", "|", "about"]
});
K('#image1').click(function () {
editor.loadPlugin('image', function () {
editor.plugin.imageDialog({
imageUrl: K('#url1').val(),
clickFn: function (url, title, width, height, border, align) {
K('#url1').val(url);
editor.hideDialog();
}
});
});
});
});
</script>
</head>
<body>
<h3>
默认模式</h3>
<div id="divUplaod" style="display: block;">
<p>
<input type="text" id="url1" value="" />
<input type="button" id="image1" value="选择图片" />(网络图片 + 本地上传)</p>
</div>
<textarea name="content" style="width: 700px; height: 200px; visibility: hidden;">KindEditor</textarea>
</body>
</html>