We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f039bae + 9b420ac commit 65dfecfCopy full SHA for 65dfecf
src/js/easymde.js
@@ -2233,8 +2233,9 @@ EasyMDE.prototype.render = function (el) {
2233
2234
2235
function assignImageBlockAttributes(parentEl, img) {
2236
- parentEl.setAttribute('data-img-src', img.url);
2237
- parentEl.setAttribute('style', '--bg-image:url(' + img.url + ');--width:' + img.naturalWidth + 'px;--height:' + calcHeight(img.naturalWidth, img.naturalHeight));
+ var url = (new URL(img.url, document.baseURI)).href;
+ parentEl.setAttribute('data-img-src', url);
2238
+ parentEl.setAttribute('style', '--bg-image:url(' + url + ');--width:' + img.naturalWidth + 'px;--height:' + calcHeight(img.naturalWidth, img.naturalHeight));
2239
_vm.codemirror.setSize();
2240
}
2241
0 commit comments