主题: 我是一个初学者,想请教一下,单独调用图片批量上传怎么用?谢谢
作者: KindGood, 发布日期: 2013-11-01 11:23:09, 浏览数: 2912
<head>
		<meta charset="utf-8" />
		<title>MultiImageDialog 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('#J_selectImage').click(function () {
		            editor.loadPlugin('multiimage', function () {
		                editor.plugin.multiImageDialog({
		                    clickFn: function (urlList) {
		                        var div = K('#J_imageView');
		                        div.html('');
		                        K.each(urlList, function (i, data) {
		                            div.append('<img src="' + data.url + '">');
		                        });
		                        editor.hideDialog();
		                    }
		                });
		            });
		        });
		    });
		</script>
	</head>

    <body>
        <form id="form1" runat="server">
        <div>
            <input type="button" id="J_selectImage" value="批量上传" />
		    <div id="J_imageView"></div>
        </div>
        </form>
    </body>

作者: KindGood, 发布日期: 2013-11-01 11:30:44
<head>
		<meta charset="utf-8" />
		<title>MultiImageDialog Examples</title>
        <link href="kindeditor-4.1.7/themes/default/default.css" rel="stylesheet" type="text/css" />
        <script src="kindeditor-4.1.7/kindeditor.js" type="text/javascript"></script>
        <script src="kindeditor-4.1.7/lang/zh_CN.js" type="text/javascript"></script>
//之前的代码路径有些问题
		<script>
		    KindEditor.ready(function (K) {
		        var editor = K.editor({
		            allowFileManager: true
		        });
		        K('#J_selectImage').click(function () {
		            editor.loadPlugin('multiimage', function () {
		                editor.plugin.multiImageDialog({
		                    clickFn: function (urlList) {
		                        var div = K('#J_imageView');
		                        div.html('');
		                        K.each(urlList, function (i, data) {
		                            div.append('<img src="' + data.url + '">');
		                        });
		                        editor.hideDialog();
		                    }
		                });
		            });
		        });
		    });
		</script>
	</head>

    <body>
        <form id="form1" runat="server">
        <div>
            <input type="button" id="J_selectImage" value="批量上传" />
		    <div id="J_imageView"></div>
        </div>
        </form>
    </body>
回复
作者: miliercode, 发布日期: 2013-11-22 14:49:54
   var editor1 = K.create('#content1', {
                cssPath: '../plugins/code/prettify.css',
                uploadJson: '../../../AjaxData/upload_json.ashx',
                fileManagerJson: '../../../AjaxData/file_manager_json.ashx',
                allowFileManager: true,
回复
发表新帖 发表回复