fledged out analytics, self gather, remove vercel speed insights

This commit is contained in:
2026-01-06 01:34:55 -05:00
parent b118a62f83
commit ea556b3677
13 changed files with 867 additions and 114 deletions

View File

@@ -298,8 +298,23 @@ const IframeEmbed = Node.create<IframeOptions>({
return {
setIframe:
(options: { src: string }) =>
({ tr, dispatch }) => {
({ tr, dispatch, editor }) => {
const { selection } = tr;
// Check if the src is a direct video file
const src = options.src || "";
const isVideoFile = /\.(mp4|mov|webm|ogg)(\?.*)?$/i.test(src);
if (isVideoFile) {
// Insert a proper video tag instead of iframe
if (dispatch) {
const videoHTML = `<video src="${src}" controls playsinline style="max-width: 100%; height: auto;"></video>`;
editor.commands.insertContent(videoHTML);
}
return true;
}
// For non-video URLs, create iframe as normal
const node = this.type.create(options);
if (dispatch) {