Implementation of
Reference
< Script src = "/common/jquery-1.9.1.min.js" type = "Text/javascript" ></ Script > < Script type = "Text/javascript" src = "/kindeditor-4.1.7/kindeditor-all.js" ></script>
<style type= "Text/css" > #imageView{background:#F5F9FF;padding:5px;}#imageView ul Li{margin:2px;float: Left;width:100px;Height:100px;position:relative;Border:1px solid #d5e4fa;}#imageView ul li img{width:100px;Height:100px;Border:0;}#imageView ul Li Span{position:Absolute; Right:5px;Top:5px;Height:14px;width:14px;background:URL (.. /images/false.gif) No-repeat;Display:None;}</style>
HTM page
<Tableclass= "Tableconfig"cellpadding= "0"cellspacing= "1"><TR> <TDclass= "Leftcss"width= "+">Product Picture:</TD> <TDcolspan= "3"> <DivID= "ImageView"class= "Clearfix"runat= "Server"><ul></ul></Div> <inputtype= "button"ID= "Upimage"value= "Bulk upload"class= "Button1" /> <label><inputtype= "checkbox"ID= "Isclear"checked= "Checked" />Keep the uploaded</label> </TD> </TR> <TR> <TDclass= "Leftcss">More information:</TD> <TDcolspan= "3">
<textareaname= "Txtcontent"ID= "Txtcontent"style= "width:100%; height:300px;"runat= "Server"></textarea> </TD> </TR> </Table>
JS section
<ScriptType= "Text/javascript" >functionBindimagelist () {$ ("#imageView ul li"). MouseEnter (function () { $( This). Find ("Span"). Show (); }). MouseLeave (function () { $( This). Find ("Span"). Hide (); }); $("#imageView ul li span"). Click (function () { if(Confirm ("OK to delete this picture")) { $( This). Parent (). remove (); } }); } varEditor; $(function() {bindimagelist (); //Load Editor StylesEditor = Kindeditor.create (' textarea[name= ' txtcontent "] ', {allowfilemanager:false, Aftercreate:function () { varSelf = This; } }); //image Upload$(' #upimage '). Click (function() {Editor.loadplugin (' Multiimage ',function() {Editor.plugin.multiImageDialog ({clickfn:function(urllist) {var_html = []; Kindeditor.each (Urllist,function(i, data) {_html.push (' <li> '+ Data.url +' "/><span title=" delete "></span><input type=" hidden "value=" '+ Data.url +' "name=" pics " /></li> '); }); if($("#isClear"). attr ("checked")! = "Checked") $(' #imageView ul '). empty (); $("#imageView ul"). Append (_html.join (")); Bindimagelist (); Editor.hidedialog (); } }); }); }); }) </Script>
Upload pictures in bulk