diff --git a/public/tinymce/plugins/paste/classes/Clipboard.js b/public/tinymce/plugins/paste/classes/Clipboard.js
index 6e77690..bfb5064 100644
--- a/public/tinymce/plugins/paste/classes/Clipboard.js
+++ b/public/tinymce/plugins/paste/classes/Clipboard.js
@@ -281,7 +281,6 @@ define("tinymce/pasteplugin/Clipboard", [
}
// load image if there is a pasted image
if (blob) {
- log(blob);
var reader = new FileReader();
reader.onload = function(event) {
// 上传之
@@ -323,10 +322,14 @@ define("tinymce/pasteplugin/Clipboard", [
});
};
reader.readAsDataURL(blob);
+ return true;
}
+ return false;
}
editor.on('paste', function(e) {
+
+
var clipboardContent = getClipboardContent(e);
var isKeyBoardPaste = new Date().getTime() - keyboardPasteTimeStamp < 100;
var plainTextMode = self.pasteFormat == "text" || keyboardPastePlainTextState;
@@ -378,13 +381,18 @@ define("tinymce/pasteplugin/Clipboard", [
pasteHtml(html, clipboardContent['text/plain']);
}
}, 0);
+
+ //-----------
+ // paste image
+ try {
+ if(pasteImage(e)) {
+ return;
+ }
+ } catch(e) {};
+
});
- //-----------
- // paste image
- try {
- pasteImage(e);
- } catch(e) {};
+
self.pasteHtml = pasteHtml;
self.pasteText = pasteText;
diff --git a/public/tinymce/plugins/paste/plugin.dev.js b/public/tinymce/plugins/paste/plugin.dev.js
index 6e85652..3c0ca0a 100644
--- a/public/tinymce/plugins/paste/plugin.dev.js
+++ b/public/tinymce/plugins/paste/plugin.dev.js
@@ -117,4 +117,4 @@
writeScripts();
})(this);
-// $hash: 5b06d9e98fb338fd1b0ff7ee116ca480
\ No newline at end of file
+// $hash: cbcf61872b3ecc41bd22dcf691e2e4dd
\ No newline at end of file
diff --git a/public/tinymce/plugins/paste/plugin.js b/public/tinymce/plugins/paste/plugin.js
index a93a4ca..83f5b81 100644
--- a/public/tinymce/plugins/paste/plugin.js
+++ b/public/tinymce/plugins/paste/plugin.js
@@ -466,7 +466,6 @@ define("tinymce/pasteplugin/Clipboard", [
}
// load image if there is a pasted image
if (blob) {
- log(blob);
var reader = new FileReader();
reader.onload = function(event) {
// 上传之
@@ -508,10 +507,14 @@ define("tinymce/pasteplugin/Clipboard", [
});
};
reader.readAsDataURL(blob);
+ return true;
}
+ return false;
}
editor.on('paste', function(e) {
+
+
var clipboardContent = getClipboardContent(e);
var isKeyBoardPaste = new Date().getTime() - keyboardPasteTimeStamp < 100;
var plainTextMode = self.pasteFormat == "text" || keyboardPastePlainTextState;
@@ -563,13 +566,18 @@ define("tinymce/pasteplugin/Clipboard", [
pasteHtml(html, clipboardContent['text/plain']);
}
}, 0);
+
+ //-----------
+ // paste image
+ try {
+ if(pasteImage(e)) {
+ return;
+ }
+ } catch(e) {};
+
});
- //-----------
- // paste image
- try {
- pasteImage(e);
- } catch(e) {};
+
self.pasteHtml = pasteHtml;
self.pasteText = pasteText;
diff --git a/public/tinymce/plugins/paste/plugin.min.js b/public/tinymce/plugins/paste/plugin.min.js
index 8916f11..bfb827b 100644
--- a/public/tinymce/plugins/paste/plugin.min.js
+++ b/public/tinymce/plugins/paste/plugin.min.js
@@ -1 +1 @@
-!function(e,t){"use strict";function n(e,t){for(var n,i=[],a=0;a
"]]):(e=n.filter(e,[[/\n\n/g,"
)$/,s+"$1"],[/\n/g,"
"]]),-1!=e.indexOf("
")&&(e=s+e)),a(e,t)}function o(){var e=i.dom,t=i.getBody(),n=i.dom.getViewPort(i.getWin()),a=i.inline?t.scrollTop:n.y,r=i.inline?t.clientHeight:n.h;s(),f=e.add(i.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"1",style:"position: absolute; top: "+(a+20)+"px;width: 10px; height: "+(r-40)+"px; overflow: hidden; opacity: 0"},v),e.setStyle(f,"left","rtl"==e.getStyle(t,"direction",!0)?65535:-65535),e.bind(f,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),g=i.selection.getRng(),f.focus(),i.selection.select(f,!0)}function s(){f&&(i.dom.unbind(f),i.dom.remove(f),g&&i.selection.setRng(g)),h=!1,f=g=null}function l(){return f?f.innerHTML:v}function c(e){var t={},n=e.clipboardData||i.getDoc().dataTransfer;if(n&&n.types){t["text/plain"]=n.getData("Text");for(var a=0;a
$/])}function s(e){if(!n.isWordContent(e))return e;var r=[];t.each(a.schema.getBlockElements(),function(e,t){r.push(t)});var o=new RegExp("(?:
[\\s\\r\\n]+|
)*(<\\/?("+r.join("|")+")[^>]*>)(?:
[\\s\\r\\n]+|
)*","g");return e=i.filter(e,[[o,"$1"]]),e=i.filter(e,[[/
/g,"
"],[/
/g," "],[/
/g,"
"]])}function l(e){return(a.settings.paste_remove_styles||a.settings.paste_remove_styles_if_webkit!==!1)&&(e=e.replace(/ style=\"[^\"]+\"/g,"")),e}e.webkit&&(r(l),r(o)),e.ie&&r(s)}}),i(b,[w,u,m,y],function(e,t,n,i){var a;e.add("paste",function(e){function r(){"text"==s.pasteFormat?(this.active(!1),s.pasteFormat="html"):(s.pasteFormat="text",this.active(!0),a||(e.windowManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),a=!0))}var o=this,s,l=e.settings;o.clipboard=s=new t(e),o.quirks=new i(e),o.wordFilter=new n(e),e.settings.paste_as_text&&(o.clipboard.pasteFormat="text"),l.paste_preprocess&&e.on("PastePreProcess",function(e){l.paste_preprocess.call(o,o,e)}),l.paste_postprocess&&e.on("PastePostProcess",function(e){l.paste_postprocess.call(o,o,e)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&o.clipboard.pasteHtml(t.content),t.text&&o.clipboard.pasteText(t.text)}),e.paste_block_drop&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),e.settings.paste_data_images||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:r,active:"text"==o.clipboard.pasteFormat}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:s.pasteFormat,onclick:r})})}),o([l,u,m,y,b])}(this);
\ No newline at end of file
+!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r
"]]):(e=n.filter(e,[[/\n\n/g,"
)$/,s+"$1"],[/\n/g,"
"]]),-1!=e.indexOf("
")&&(e=s+e)),r(e,t)}function o(){var e=i.dom,t=i.getBody(),n=i.dom.getViewPort(i.getWin()),r=i.inline?t.scrollTop:n.y,a=i.inline?t.clientHeight:n.h;s(),f=e.add(i.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"1",style:"position: absolute; top: "+(r+20)+"px;width: 10px; height: "+(a-40)+"px; overflow: hidden; opacity: 0"},v),e.setStyle(f,"left","rtl"==e.getStyle(t,"direction",!0)?65535:-65535),e.bind(f,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),g=i.selection.getRng(),f.focus(),i.selection.select(f,!0)}function s(){f&&(i.dom.unbind(f),i.dom.remove(f),g&&i.selection.setRng(g)),h=!1,f=g=null}function l(){return f?f.innerHTML:v}function c(e){var t={},n=e.clipboardData||i.getDoc().dataTransfer;if(n&&n.types){t["text/plain"]=n.getData("Text");for(var r=0;r
$/])}function s(e){if(!n.isWordContent(e))return e;var a=[];t.each(r.schema.getBlockElements(),function(e,t){a.push(t)});var o=new RegExp("(?:
[\\s\\r\\n]+|
)*(<\\/?("+a.join("|")+")[^>]*>)(?:
[\\s\\r\\n]+|
)*","g");return e=i.filter(e,[[o,"$1"]]),e=i.filter(e,[[/
/g,"
"],[/
/g," "],[/
/g,"
"]])}function l(e){return(r.settings.paste_remove_styles||r.settings.paste_remove_styles_if_webkit!==!1)&&(e=e.replace(/ style=\"[^\"]+\"/g,"")),e}e.webkit&&(a(l),a(o)),e.ie&&a(s)}}),i(b,[w,u,m,y],function(e,t,n,i){var r;e.add("paste",function(e){function a(){"text"==s.pasteFormat?(this.active(!1),s.pasteFormat="html"):(s.pasteFormat="text",this.active(!0),r||(e.windowManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),r=!0))}var o=this,s,l=e.settings;o.clipboard=s=new t(e),o.quirks=new i(e),o.wordFilter=new n(e),e.settings.paste_as_text&&(o.clipboard.pasteFormat="text"),l.paste_preprocess&&e.on("PastePreProcess",function(e){l.paste_preprocess.call(o,o,e)}),l.paste_postprocess&&e.on("PastePostProcess",function(e){l.paste_postprocess.call(o,o,e)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&o.clipboard.pasteHtml(t.content),t.text&&o.clipboard.pasteText(t.text)}),e.paste_block_drop&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),e.settings.paste_data_images||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:a,active:"text"==o.clipboard.pasteFormat}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:s.pasteFormat,onclick:a})})}),o([l,u,m,y,b])}(this);
\ No newline at end of file