fix: image fallback regression (#1989)

* fix: image fallback regression

* fix image preview on upload

* fix image loading
This commit is contained in:
Philip Okugbe
2026-03-04 11:51:43 +00:00
committed by GitHub
parent 37355452e1
commit bea1637519
6 changed files with 34 additions and 11 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import { ReactNodeViewRenderer } from "@tiptap/react";
import { Range, Node, mergeAttributes, ResizableNodeView } from "@tiptap/core";
import { normalizeFileUrl } from "../media-utils";
import type { ResizableNodeViewDirection } from "@tiptap/core";
export type VideoResizeOptions = {
@@ -223,7 +224,7 @@ export const TiptapVideo = Node.create<VideoOptions>({
}
const el = document.createElement("video");
el.src = node.attrs.src;
el.src = normalizeFileUrl(node.attrs.src);
el.controls = true;
el.preload = "metadata";
el.style.display = "block";
@@ -260,7 +261,7 @@ export const TiptapVideo = Node.create<VideoOptions>({
}
if (updatedNode.attrs.src !== currentNode.attrs.src) {
el.src = updatedNode.attrs.src || "";
el.src = normalizeFileUrl(updatedNode.attrs.src);
}
const w = updatedNode.attrs.width;