import { NonDeletedExcalidrawElement } from "@zsviczian/excalidraw/types/element/types"; import ExcalidrawView from "./ExcalidrawView"; import { Notice, WorkspaceLeaf, WorkspaceSplit } from "obsidian"; import * as React from "react"; import { ConstructableWorkspaceSplit, getContainerForDocument, isObsidianThemeDark } from "./utils/ObsidianUtils"; import { DEVICE, EXTENDED_EVENT_TYPES, KEYBOARD_EVENT_TYPES } from "./constants"; import { ExcalidrawImperativeAPI, UIAppState } from "@zsviczian/excalidraw/types/types"; import { ObsidianCanvasNode } from "./utils/CanvasNodeFactory"; import { processLinkText, patchMobileView } from "./utils/CustomEmbeddableUtils"; declare module "obsidian" { interface Workspace { floatingSplit: any; } interface WorkspaceSplit { containerEl: HTMLDivElement; } } //-------------------------------------------------------------------------------- //Render webview for anything other than Vimeo and Youtube //Vimeo and Youtube are rendered by Excalidraw because of the window messaging //required to control the video //-------------------------------------------------------------------------------- export const renderWebView = (src: string, view: ExcalidrawView, id: string, appState: UIAppState):JSX.Element =>{ if(DEVICE.isDesktop) { return ( view.updateEmbeddableRef(id, ref)} className="excalidraw__embeddable" title="Excalidraw Embedded Content" allowFullScreen={true} src={src} style={{ overflow: "hidden", borderRadius: "var(--embeddable-radius)", }} /> ); } return (