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",
|
||||
action: sortselection,
|
||||
allowunsaved: true
|
||||
},
|
||||
{
|
||||
hint: "Show backlinks",
|
||||
action: backlinks
|
||||
}];
|
||||
|
||||
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()
|
||||
{
|
||||
var content = md.value;
|
||||
|
|
Loading…
Reference in New Issue