2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-02 15:44:28 -06:00

Accept APNG for image uploads

This commit is contained in:
Jonathan 2022-05-19 19:02:14 +02:00 committed by GitHub
parent c311bfa6b0
commit 146a5e3fb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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