百度編輯器:上傳圖片
阿新 • • 發佈:2017-05-26
html splay div log 監聽 conf 圖片地址 彈出 .config
<!DOCTYPE html> <html> <head> <title>we234234</title> <script src="ueditor.config.js"></script> <script src="ueditor.all.js"></script> <script src="lang/zh-cn/zh-cn.js"></script> </head> <body> <div id="editor" style="display: none;"></div> <button type="button" onClick="upImage()">上傳</button> </body> <script> /*kindeditor 編輯器*/ var ue = UE.getEditor(‘editor‘); //監聽圖片上傳 ue.addListener(‘beforeInsertImage‘, function (t,arg) { alert(‘這是圖片地址:‘+arg[0].src); });//彈出圖片上傳的對話框 function upImage() { var myImage = ue.getDialog("insertimage"); myImage.open(); } </script> </html>
百度編輯器:上傳圖片