mirror of
https://github.com/Ellpeck/ObsidianJustSharePlease.git
synced 2024-11-23 02:48:34 +01:00
implemented opening note
This commit is contained in:
parent
7067957899
commit
b22540c772
2 changed files with 11 additions and 3 deletions
|
@ -31,8 +31,10 @@ export class JSPView extends ItemView {
|
|||
.setClass("clickable-icon")
|
||||
.setTooltip("Open in Obsidian")
|
||||
.setIcon("edit")
|
||||
.onClick(async () => {
|
||||
// TODO open in obsidian
|
||||
.onClick(async e => {
|
||||
let leaf = this.app.workspace.getLeaf(e.ctrlKey);
|
||||
await leaf.openFile(file);
|
||||
this.app.workspace.setActiveLeaf(leaf, {focus: true});
|
||||
});
|
||||
new ButtonComponent(div)
|
||||
.setClass("clickable-icon")
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
{
|
||||
"url": "http://localhost:8080",
|
||||
"shared": [],
|
||||
"shared": [
|
||||
{
|
||||
"id": "6ba272db",
|
||||
"password": "6bf48896857373ff766f44052cbc8c38",
|
||||
"path": "Cool Test Note.md"
|
||||
}
|
||||
],
|
||||
"stripFrontmatter": true,
|
||||
"includeNoteName": true
|
||||
}
|
Loading…
Reference in a new issue