fix video size

This commit is contained in:
hamid zarghami
2025-09-03 09:16:59 +03:30
parent 0e16af827f
commit 3ca8b89a47
5 changed files with 37 additions and 87 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ class VideoBlot extends BlockEmbed {
const iframe = document.createElement("iframe");
iframe.setAttribute("src", value.url);
iframe.setAttribute("width", value.width || "100%");
iframe.setAttribute("height", value.height || "315");
iframe.setAttribute("height", value.height || "auto");
iframe.setAttribute("frameborder", "0");
iframe.setAttribute("allowfullscreen", "true");
iframe.style.maxWidth = "100%";
@@ -38,7 +38,7 @@ class VideoBlot extends BlockEmbed {
return {
url: iframe.getAttribute("src") || "",
width: iframe.getAttribute("width") || "100%",
height: iframe.getAttribute("height") || "315",
height: iframe.getAttribute("height") || "auto",
};
}
}