* fix cannot resize image witch pasted from clipboard.

This commit is contained in:
Catouse
2019-12-13 14:11:47 +08:00
parent a5a8751b8d
commit 3a12adb09c
2 changed files with 13 additions and 9 deletions
+6 -2
View File
@@ -692,6 +692,9 @@
}
function _formatUrl(url, mode, host, pathname) {
if (url[0] === '#') {
return url;
}
mode = _undef(mode, '').toLowerCase();
if(url.substr(0, 5) != 'data:') {
url = url.replace(/([^:])\/\//g, '$1/');
@@ -10247,9 +10250,10 @@ KindEditor.plugin('pasteimage', function(K) {
self.undo();
self._redoStack.pop();
if (data) {
edit.cmd.inserthtml(data);
var $img = $(data);
edit.cmd.insertimage($img.attr('src'), $img.attr('title'), $img.attr('width'), $img.attr('height'));
} else {
edit.cmd.inserthtml(html);
edit.cmd.insertimage(result);
}
pasteEnd();
}).error(function()
File diff suppressed because one or more lines are too long