added: command to list backlinks
This commit is contained in:
parent
62b28afedd
commit
b0c9881768
12
main.js
12
main.js
|
@ -275,6 +275,10 @@ var commands = [
|
||||||
hint: "Sort text",
|
hint: "Sort text",
|
||||||
action: sortselection,
|
action: sortselection,
|
||||||
allowunsaved: true
|
allowunsaved: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
hint: "Show backlinks",
|
||||||
|
action: backlinks
|
||||||
}];
|
}];
|
||||||
|
|
||||||
var snippets = [
|
var snippets = [
|
||||||
|
@ -1564,6 +1568,14 @@ function getlinesrange()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function backlinks()
|
||||||
|
{
|
||||||
|
searchinlist(localdata
|
||||||
|
.filter(n => n.content.includes("[[" + currentnote.title + "]]"))
|
||||||
|
.map(n => n.title))
|
||||||
|
.then(loadnote);
|
||||||
|
}
|
||||||
|
|
||||||
function sortselection()
|
function sortselection()
|
||||||
{
|
{
|
||||||
var content = md.value;
|
var content = md.value;
|
||||||
|
|
Loading…
Reference in New Issue