( app: App, file: TFile, )
| 15 | * meaning its editor can be used to insert at the cursor. |
| 16 | */ |
| 17 | export function getMarkdownEditorViewForFile( |
| 18 | app: App, |
| 19 | file: TFile, |
| 20 | ): MarkdownView | null { |
| 21 | const view = app.workspace.getActiveViewOfType(MarkdownView); |
| 22 | if (view?.file?.path === file.path) return view; |
| 23 | return null; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * @returns true if the text was inserted, false if there was no active Markdown |
no outgoing calls
no test coverage detected