Avoid processing many times the same image

Cache img key during processing to avoid having to process it
thousands of times
pull/592/head
S1m 3 weeks ago
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…
Cancel
Save