( app: App, parentLeaf: WorkspaceLeaf, initiatingEl?: HTMLElement, fileName?: string, onShowCallback?: (leaf: FlowEditor) => Promise<unknown> )
| 5 | |
| 6 | |
| 7 | export const openPathInElement = ( |
| 8 | app: App, |
| 9 | parentLeaf: WorkspaceLeaf, |
| 10 | initiatingEl?: HTMLElement, |
| 11 | fileName?: string, |
| 12 | onShowCallback?: (leaf: FlowEditor) => Promise<unknown> |
| 13 | ) => { |
| 14 | const parent = (parentLeaf ?? app.workspace.getLeaf()) as unknown as FlowEditorParent; |
| 15 | if (!initiatingEl) initiatingEl = parent.containerEl; |
| 16 | const hoverPopover = new FlowEditor( |
| 17 | parent, |
| 18 | initiatingEl!, |
| 19 | app, |
| 20 | undefined, |
| 21 | onShowCallback |
| 22 | ); |
| 23 | |
| 24 | // plugin.attachPortal(hoverPopover); |
| 25 | if (fileName) |
| 26 | hoverPopover.titleEl.textContent = fileName.substring( |
| 27 | 0, |
| 28 | fileName.lastIndexOf(".") |
| 29 | ); |
| 30 | }; |
no outgoing calls
no test coverage detected