obsidian plugin open options

NaNdi April 27, 2026
Source

Yes. Plugin views can open in three places:

1. Main editor area (the center pane):

await this.app.workspace.getLeaf(true).setViewState({
  type: 'my-plugin-view',
  active: true,
});

getLeaf(true) creates a new leaf in the main editor area, not the sidebar. This is how plugins like Canvas, Cards View, and Kanban work -- they take over the center pane.

2. Sidebar (left or right):

await this.app.workspace.getRightLeaf(false).setViewState({
  type: 'my-plugin-view',
  active: true,
});

3. A new window (popout):

await this.app.workspace.openPopoutLeaf().setViewState({
  type: 'my-plugin-view',
  active: true,
});

The key difference is which leaf you target:

| Method | Where |
|--------|-------|
| getLeaf(true) | Main editor area (new tab) |
| getLeaf(false) | Main editor area (replaces current) |
| getRightLeaf(false) | Right sidebar |
| getLeftLeaf(false) | Left sidebar |
| openPopoutLeaf() | Separate window |

So your plugin view doesn't have to be in the sidebar at all. Most "full" plugin views (Canvas, Kanban, Excalidraw) live in the main editor area as a tab alongside markdown files.

Discussion in the ATmosphere

Loading comments...