implemented opening note

This commit is contained in:
Ell 2023-08-17 17:36:28 +02:00
parent 7067957899
commit b22540c772
2 changed files with 11 additions and 3 deletions

View file

@ -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")

View file

@ -1,6 +1,12 @@
{
"url": "http://localhost:8080",
"shared": [],
"shared": [
{
"id": "6ba272db",
"password": "6bf48896857373ff766f44052cbc8c38",
"path": "Cool Test Note.md"
}
],
"stripFrontmatter": true,
"includeNoteName": true
}