mirror of
https://github.com/quorafind/Obsidian-Float-Search.git
synced 2026-07-22 07:30:25 +00:00
feat: support open search view in leaf
This commit is contained in:
parent
ae5ff76e33
commit
0644d317c9
1 changed files with 12 additions and 0 deletions
|
|
@ -273,6 +273,18 @@ export default class FloatSearchPlugin extends Plugin {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.addCommand({
|
||||
id: 'open-search-view',
|
||||
name: 'Open Search View',
|
||||
callback: async () => {
|
||||
const leaf = app.workspace.getLeaf();
|
||||
leaf.setPinned(true);
|
||||
await leaf.setViewState({
|
||||
type: "search",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
registerEditorMenuHandler() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue