粘贴图片 留言和回复框 保持一直截图都可以粘贴进去

This commit is contained in:
yuanke 2016-06-27 15:57:45 +08:00
parent dd397a060b
commit a83400f233
1 changed files with 21 additions and 21 deletions

View File

@ -328,27 +328,27 @@ function enablePasteImg(_editor) {
$(nodeBody).on('pasteImage', function(ev, data) { $(nodeBody).on('pasteImage', function(ev, data) {
//粘贴图片时走这里会出现两张图片走df()即可 //粘贴图片时走这里会出现两张图片走df()即可
// console.log('pasteImage'); console.log('pasteImage');
// console.log("dataURL: " + data.dataURL); console.log("dataURL: " + data.dataURL);
// console.log("width: " + data.width); console.log("width: " + data.width);
// console.log("height: " + data.height); console.log("height: " + data.height);
// var blob = dataURItoBlob(data.dataURL); var blob = dataURItoBlob(data.dataURL);
// if (data.blob !== null) { if (data.blob !== null) {
// var data = new FormData(); var data = new FormData();
// data.append("imgFile",blob, "imageFilename.png"); data.append("imgFile",blob, "imageFilename.png");
// console.log(data); console.log(data);
// $.ajax({ $.ajax({
// url: '/kindeditor/upload?dir=image', url: '/kindeditor/upload?dir=image',
// contentType: false, contentType: false,
// type: 'POST', type: 'POST',
// data: data, data: data,
// processData: false, processData: false,
// success: function(data) { success: function(data) {
// console.log(data); console.log(data);
// editor.exec('insertimage', JSON.parse(data).url); editor.exec('insertimage', JSON.parse(data).url);
// } }
// }); });
// } }
}); });
return; return;
}; };