2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-23 09:54:28 -06:00

Merge pull request #417 from sghoweri/patch-1

This commit is contained in:
Jeroen Akkerman 2022-03-23 20:32:49 +01:00 committed by GitHub
commit 8765cf197b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -901,7 +901,7 @@ function afterImageUploaded(editor, url) {
var ext = imageName.substring(imageName.lastIndexOf('.') + 1).replace(/\?.*$/, '').toLowerCase(); var ext = imageName.substring(imageName.lastIndexOf('.') + 1).replace(/\?.*$/, '').toLowerCase();
// Check if media is an image // Check if media is an image
if (['png', 'jpg', 'jpeg', 'gif', 'svg'].includes(ext)) { if (['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp'].includes(ext)) {
_replaceSelection(cm, stat.image, options.insertTexts.uploadedImage, url); _replaceSelection(cm, stat.image, options.insertTexts.uploadedImage, url);
} else { } else {
var text_link = options.insertTexts.link; var text_link = options.insertTexts.link;