Update editor.js

This commit is contained in:
2026-06-14 21:50:28 +02:00
parent 8e52d99ba4
commit 703d8d7519
+5 -3
View File
@@ -60,9 +60,11 @@ function initEditor() {
imgPreview.style.display = "block";
imgPreview.style.marginTop = "10px";
if (value && typeof value === 'string' && value.startsWith('uploads/')) {
imgPreview.src = value;
blockDiv.setAttribute("data-value", value);
if (value && typeof value === 'string') {
if (value.startsWith('uploads/') || value.startsWith('data:image/')) {
imgPreview.src = value;
blockDiv.setAttribute("data-value", value);
}
}
fileInput.addEventListener("change", function() {