135EditorDialogPage.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5. <title>135编辑器外部编辑调用</title>
  6. <style>
  7. html, body {
  8. padding: 0;
  9. margin: 0;
  10. }
  11. #editor135 {
  12. position: absolute;
  13. width: 100%;
  14. height: 100%;
  15. border: none;
  16. box-sizing: border-box;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <!-- 如需要appkey进行额外私有化等对接,请联系QQ: 285694665 微信: hncszdb -->
  22. <iframe id="editor135" src="https://www.135editor.com/simple_editor.html?callback=true&appkey="></iframe>
  23. <script type="text/javascript" src="/statics/plugins/neditor/dialogs/internal.js?t=1458602018"></script>
  24. <script>
  25. var editor135 = document.getElementById('editor135');
  26. window.onload = function () {
  27. setTimeout(function(){
  28. editor135.contentWindow.postMessage(editor.getContent(),'*');
  29. },3000);
  30. };
  31. document.addEventListener("mousewheel", function (event) {
  32. event.preventDefault();
  33. event.stopPropagation();
  34. });
  35. window.addEventListener('message', function (event) {
  36. if (typeof event.data !== 'string') return;
  37. editor.setContent(event.data);
  38. editor.fireEvent("catchRemoteImage");
  39. dialog.close();
  40. }, false);
  41. </script>
  42. </body>