Permalink
Browse files

fix #821

  • Loading branch information...
joyqi committed Jan 9, 2019
1 parent 57a5857 commit 8045a0d4034d7cb9476d5a612879ab1e27e945db
Showing with 1 addition and 1 deletion.
  1. +1 −1 admin/editor-js.php
@@ -207,7 +207,7 @@ function initMarkdown() {
// 剪贴板复制图片
textarea.pastableTextarea().on('pasteImage', function (e, data) {
name = data.name.replace(/[\(\)\[\]\*#!]/g, '');
var name = data.name ? data.name.replace(/[\(\)\[\]\*#!]/g, '') : (new Date()).toISOString().replace(/\..+$/, '');
if (!name.match(/\.[a-z0-9]{2,}$/i)) {
var ext = data.blob.type.split('/').pop();
name += '.' + ext;

0 comments on commit 8045a0d

Please sign in to comment.