Update editor.js
This commit is contained in:
+5
-3
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user