From dea24f7f71a6f7cd8e2f56b2150dc84be1a4c4d5 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Sun, 22 Jan 2023 19:18:14 -0600 Subject: [PATCH] Fix editor bug --- resources/dmmd-preview.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/dmmd-preview.js b/resources/dmmd-preview.js index 4c16839..2450ea8 100644 --- a/resources/dmmd-preview.js +++ b/resources/dmmd-preview.js @@ -23,6 +23,12 @@ $(function () { csrfmiddlewaretoken: $.cookie('csrftoken') }, function (result) { $content.html(result); + $(".dmmd-preview-content [data-src]img").each(function() { + $(this).attr("src", $(this).attr("data-src")); + }) + $(".dmmd-preview-content [data-src]iframe").each(function() { + $(this).attr("src", $(this).attr("data-src")); + }) $preview.addClass('dmmd-preview-has-content').removeClass('dmmd-preview-stale'); var $jax = $content.find('.require-mathjax-support');