kindeditor自定义添加网络视频插件。修改批量图片上传方式原flash改为JS和h5上传

点击下载文件包到项目中,

https://download.csdn.net/download/wybshyy/12331173

下载连接

 

修改返回的url:

diyUpload.js

$fileBox.find("img").attr("src",response.data.url);

response.data.url是图片网址默认是文件形式的地址,不是字符串地址

 

修改服务器url:

multi_image.js

kindeditor参数:

 uploadJson: 服务器上传地址,
 uploadMultiImgUrl: 多图上传服务器服务器地址,
 items:['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template','code',
        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent',             
        'subscript',
        'superscript', 'clearhtml', 'quickformat', '|','','', 'fullscreen', '/',
        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 
        'image',"multi_image",'diy_video',
        'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
        'anchor', 'link', 'unlink'],

引入文件:

<#--自定义多图上传-->
<link rel="stylesheet" type="text/css" href="/kindeditor/plugins/multi_image/diyUpload/css/webuploader.css">
<link rel="stylesheet" type="text/css" href="/kindeditor/plugins/multi_image/diyUpload/css/diyUpload.css">
<script charset="utf-8" src="/kindeditor/plugins/multi_image/diyUpload/js/webuploader.html5only.min.js"></script>
<script charset="utf-8" src="/kindeditor/plugins/multi_image/diyUpload/js/diyUpload.js"></script>
<#-- 编辑器源码文件 -->
<script charset="utf-8" src="/kindeditor/kindeditor-all-min.js"></script>
<script charset="utf-8" src="/kindeditor/lang/zh-CN.js"></script>

转自:https://blog.csdn.net/m0_37755308/article/details/97111653

 

 

posted @ 2020-04-17 13:01  离。  阅读(209)  评论(0编辑  收藏