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")
|
.setClass("clickable-icon")
|
||||||
.setTooltip("Open in Obsidian")
|
.setTooltip("Open in Obsidian")
|
||||||
.setIcon("edit")
|
.setIcon("edit")
|
||||||
.onClick(async () => {
|
.onClick(async e => {
|
||||||
// TODO open in obsidian
|
let leaf = this.app.workspace.getLeaf(e.ctrlKey);
|
||||||
|
await leaf.openFile(file);
|
||||||
|
this.app.workspace.setActiveLeaf(leaf, {focus: true});
|
||||||
});
|
});
|
||||||
new ButtonComponent(div)
|
new ButtonComponent(div)
|
||||||
.setClass("clickable-icon")
|
.setClass("clickable-icon")
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
{
|
{
|
||||||
"url": "http://localhost:8080",
|
"url": "http://localhost:8080",
|
||||||
"shared": [],
|
"shared": [
|
||||||
|
{
|
||||||
|
"id": "6ba272db",
|
||||||
|
"password": "6bf48896857373ff766f44052cbc8c38",
|
||||||
|
"path": "Cool Test Note.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
"stripFrontmatter": true,
|
"stripFrontmatter": true,
|
||||||
"includeNoteName": true
|
"includeNoteName": true
|
||||||
}
|
}
|
Loading…
Reference in a new issue