mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-24 10:24:29 -06:00
Avoid processing many times the same image
Cache img key during processing to avoid having to process it thousands of times
This commit is contained in:
parent
f039bae67f
commit
97bf9ce8fd
@ -2267,6 +2267,7 @@ EasyMDE.prototype.render = function (el) {
|
||||
}
|
||||
|
||||
if (!window.EMDEimagesCache[keySrc]) {
|
||||
window.EMDEimagesCache[keySrc] = {};
|
||||
var img = document.createElement('img');
|
||||
img.onload = function () {
|
||||
window.EMDEimagesCache[keySrc] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user