multi-image-dialog.html 949 B

1234567891011121314151617181920212223242526272829303132333435
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>MultiImageDialog Examples</title>
  6. <link rel="stylesheet" href="../themes/default/default.css" />
  7. <script src="../kindeditor.js"></script>
  8. <script src="../lang/zh_CN.js"></script>
  9. <script>
  10. KindEditor.ready(function(K) {
  11. var editor = K.editor({
  12. allowFileManager : true
  13. });
  14. K('#J_selectImage').click(function() {
  15. editor.loadPlugin('multiimage', function() {
  16. editor.plugin.multiImageDialog({
  17. clickFn : function(urlList) {
  18. var div = K('#J_imageView');
  19. div.html('');
  20. K.each(urlList, function(i, data) {
  21. div.append('<img src="' + data.url + '">');
  22. });
  23. editor.hideDialog();
  24. }
  25. });
  26. });
  27. });
  28. });
  29. </script>
  30. </head>
  31. <body>
  32. <input type="button" id="J_selectImage" value="批量上传" />
  33. <div id="J_imageView"></div>
  34. </body>
  35. </html>