mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
183 lines
200 KiB
HTML
183 lines
200 KiB
HTML
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Api | trilium</title><meta name="description" content="Documentation for trilium"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">trilium</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/Frontend_Script_API.html">Frontend Script API</a></li><li><a href="" aria-current="page">Api</a></li></ul><h1>Interface Api</h1></div><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">Api</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#container">$container</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#basicwidget">BasicWidget</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="../classes/Frontend_Script_API.BasicWidget.html" class="tsd-signature-type tsd-kind-class">BasicWidget</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#bindglobalshortcut">bindGlobalShortcut</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">keyboardShortcut</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">handler</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Frontend_Script_API._internal_.Handler.html" class="tsd-signature-type tsd-kind-type-alias">Handler</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">namespace</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#createlink">createLink</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="Frontend_Script_API._internal_.CreateLinkOptions.html" class="tsd-signature-type tsd-kind-interface">CreateLinkOptions</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#createnotelink">createNoteLink</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="Frontend_Script_API._internal_.CreateLinkOptions.html" class="tsd-signature-type tsd-kind-interface">CreateLinkOptions</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#currentnote">currentNote</a><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#dayjs">dayjs</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">__module</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#formatdateiso">formatDateISO</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#formatnotesize">formatNoteSize</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#formatsize">formatSize</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#getdaynote">getDayNote</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#getmonthnote">getMonthNote</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">month</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#getquarternote">getQuarterNote</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">quarter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#gettodaynote">getTodayNote</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#getweekfirstdaynote">getWeekFirstDayNote</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#getweeknote">getWeekNote</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">week</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#getyearnote">getYearNote</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">year</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#logmessages">logMessages</a><span class="tsd-signature-symbol">:</span> <a href="../types/Backend_Script_API._internal_.Record.html" class="tsd-signature-type tsd-kind-type-alias">Record</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#logspacedupdates">logSpacedUpdates</a><span class="tsd-signature-symbol">:</span> <a href="../types/Backend_Script_API._internal_.Record.html" class="tsd-signature-type tsd-kind-type-alias">Record</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <a href="../classes/Frontend_Script_API._internal_.default-3.html" class="tsd-signature-type tsd-kind-class">default</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#notecontextawarewidget">NoteContextAwareWidget</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="../classes/Frontend_Script_API.NoteContextAwareWidget.html" class="tsd-signature-type tsd-kind-class">NoteContextAwareWidget</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#originentity">originEntity</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#parsedate">parseDate</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#protectnote">protectNote</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">protect</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">includingSubtree</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#protectsubtree">protectSubTree</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">protect</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">includingSubtree</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#randomstring">randomString</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">len</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#rightpanelwidget">RightPanelWidget</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="../classes/Frontend_Script_API.RightPanelWidget.html" class="tsd-signature-type tsd-kind-class">RightPanelWidget</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#setupelementtooltip">setupElementTooltip</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">$el</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#showconfirmdialog">showConfirmDialog</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#showerror">showError</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">delay</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#showinfodialog">showInfoDialog</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#showmessage">showMessage</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">delay</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#showpromptdialog">showPromptDialog</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">props</span><span class="tsd-signature-symbol">:</span> <a href="Frontend_Script_API._internal_.PromptDialogOptions.html" class="tsd-signature-type tsd-kind-interface">PromptDialogOptions</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#startnote">startNote</a><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#triggercommand">triggerCommand</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">keyof</span> <a href="../types/Frontend_Script_API._internal_.CommandMappings.html" class="tsd-signature-type tsd-kind-type-alias">CommandMappings</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">_data</span><span class="tsd-signature-symbol">?:</span> <a href="../types/Frontend_Script_API._internal_.CommandMappings.html" class="tsd-signature-type tsd-kind-type-alias">CommandMappings</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#triggerevent">triggerEvent</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">extends</span> <a href="../types/Frontend_Script_API._internal_.EventNames.html" class="tsd-signature-type tsd-kind-type-alias">EventNames</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/Frontend_Script_API._internal_.EventData.html" class="tsd-signature-type tsd-kind-type-alias">EventData</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#waituntilsynced">waitUntilSynced</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#activatenewnote-1">activateNewNote</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#activatenote-1">activateNote</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#addbuttontotoolbar-1">addButtonToToolbar</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">:</span> <a href="Frontend_Script_API._internal_.AddToToolbarOpts.html" class="tsd-signature-type tsd-kind-interface">AddToToolbarOpts</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#addtexttoactivecontexteditor-1">addTextToActiveContextEditor</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">text</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getactivecontext-1">getActiveContext</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getactivecontextcodeeditor-1">getActiveContextCodeEditor</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getactivecontextnote-1">getActiveContextNote</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getactivecontextnotepath-1">getActiveContextNotePath</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getactivecontexttexteditor-1">getActiveContextTextEditor</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getactivemaincontext-1">getActiveMainContext</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getactivenotedetailwidget-1">getActiveNoteDetailWidget</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API._internal_.default-2.html" class="tsd-signature-type tsd-kind-class">default</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getcomponentbyel-1">getComponentByEl</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">el</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.default.html" class="tsd-signature-type tsd-kind-class">default</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getinstancename-1">getInstanceName</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getmainnotecontexts-1">getMainNoteContexts</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getnote-1">getNote</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getnotecontexts-1">getNoteContexts</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#getnotes-1">getNotes</a><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">noteIds</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">silentNotFoundError</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#log-1">log</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#opensplitwithnote-1">openSplitWithNote</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">activate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#opentabwithnote-1">openTabWithNote</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">activate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#refreshincludednote-1">refreshIncludedNote</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">includedNoteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#reloadnotes-1">reloadNotes</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteIds</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#runasynconbackendwithmanualtransactionhandling-1">runAsyncOnBackendWithManualTransactionHandling</a><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">func</span><span class="tsd-signature-symbol">:</span> <a href="../types/Frontend_Script_API._internal_.Func.html" class="tsd-signature-type tsd-kind-type-alias">Func</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#runonbackend-1">runOnBackend</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">func</span><span class="tsd-signature-symbol">:</span> <a href="../types/Frontend_Script_API._internal_.Func.html" class="tsd-signature-type tsd-kind-type-alias">Func</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#searchfornote-1">searchForNote</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">searchString</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#searchfornotes-1">searchForNotes</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">searchString</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-call-signature" href="#sethoistednoteid-1">setHoistedNoteId</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L62">src/public/app/services/frontend_script_api.ts:62</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#container" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$container</span></a>
|
||
<a href="#basicwidget" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Basic<wbr/>Widget</span></a>
|
||
<a href="#bindglobalshortcut" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bind<wbr/>Global<wbr/>Shortcut</span></a>
|
||
<a href="#createlink" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>create<wbr/>Link</span></a>
|
||
<a href="#createnotelink" class="tsd-index-link deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>create<wbr/>Note<wbr/>Link</span></a>
|
||
<a href="#currentnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>current<wbr/>Note</span></a>
|
||
<a href="#dayjs" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dayjs</span></a>
|
||
<a href="#formatdateiso" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>format<wbr/>DateISO</span></a>
|
||
<a href="#formatnotesize" class="tsd-index-link deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>format<wbr/>Note<wbr/>Size</span></a>
|
||
<a href="#formatsize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>format<wbr/>Size</span></a>
|
||
<a href="#getdaynote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Day<wbr/>Note</span></a>
|
||
<a href="#getmonthnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Month<wbr/>Note</span></a>
|
||
<a href="#getquarternote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Quarter<wbr/>Note</span></a>
|
||
<a href="#gettodaynote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Today<wbr/>Note</span></a>
|
||
<a href="#getweekfirstdaynote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Week<wbr/>First<wbr/>Day<wbr/>Note</span></a>
|
||
<a href="#getweeknote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Week<wbr/>Note</span></a>
|
||
<a href="#getyearnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Year<wbr/>Note</span></a>
|
||
<a href="#logmessages" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>log<wbr/>Messages</span></a>
|
||
<a href="#logspacedupdates" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>log<wbr/>Spaced<wbr/>Updates</span></a>
|
||
<a href="#notecontextawarewidget" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Note<wbr/>Context<wbr/>Aware<wbr/>Widget</span></a>
|
||
<a href="#originentity" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>origin<wbr/>Entity</span></a>
|
||
<a href="#parsedate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>parse<wbr/>Date</span></a>
|
||
<a href="#protectnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>protect<wbr/>Note</span></a>
|
||
<a href="#protectsubtree" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>protect<wbr/>Sub<wbr/>Tree</span></a>
|
||
<a href="#randomstring" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>random<wbr/>String</span></a>
|
||
<a href="#rightpanelwidget" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Right<wbr/>Panel<wbr/>Widget</span></a>
|
||
<a href="#setupelementtooltip" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>setup<wbr/>Element<wbr/>Tooltip</span></a>
|
||
<a href="#showconfirmdialog" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Confirm<wbr/>Dialog</span></a>
|
||
<a href="#showerror" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Error</span></a>
|
||
<a href="#showinfodialog" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Info<wbr/>Dialog</span></a>
|
||
<a href="#showmessage" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Message</span></a>
|
||
<a href="#showpromptdialog" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Prompt<wbr/>Dialog</span></a>
|
||
<a href="#startnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>start<wbr/>Note</span></a>
|
||
<a href="#triggercommand" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>trigger<wbr/>Command</span></a>
|
||
<a href="#triggerevent" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>trigger<wbr/>Event</span></a>
|
||
<a href="#waituntilsynced" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>wait<wbr/>Until<wbr/>Synced</span></a>
|
||
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="#activatenewnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>activate<wbr/>New<wbr/>Note</span></a>
|
||
<a href="#activatenote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>activate<wbr/>Note</span></a>
|
||
<a href="#addbuttontotoolbar" class="tsd-index-link deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Button<wbr/>To<wbr/>Toolbar</span></a>
|
||
<a href="#addtexttoactivecontexteditor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Text<wbr/>To<wbr/>Active<wbr/>Context<wbr/>Editor</span></a>
|
||
<a href="#getactivecontext" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context</span></a>
|
||
<a href="#getactivecontextcodeeditor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context<wbr/>Code<wbr/>Editor</span></a>
|
||
<a href="#getactivecontextnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context<wbr/>Note</span></a>
|
||
<a href="#getactivecontextnotepath" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context<wbr/>Note<wbr/>Path</span></a>
|
||
<a href="#getactivecontexttexteditor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context<wbr/>Text<wbr/>Editor</span></a>
|
||
<a href="#getactivemaincontext" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Main<wbr/>Context</span></a>
|
||
<a href="#getactivenotedetailwidget" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Note<wbr/>Detail<wbr/>Widget</span></a>
|
||
<a href="#getcomponentbyel" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Component<wbr/>By<wbr/>El</span></a>
|
||
<a href="#getinstancename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Instance<wbr/>Name</span></a>
|
||
<a href="#getmainnotecontexts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Main<wbr/>Note<wbr/>Contexts</span></a>
|
||
<a href="#getnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Note</span></a>
|
||
<a href="#getnotecontexts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Note<wbr/>Contexts</span></a>
|
||
<a href="#getnotes" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Notes</span></a>
|
||
<a href="#log" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>log</span></a>
|
||
<a href="#opensplitwithnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>open<wbr/>Split<wbr/>With<wbr/>Note</span></a>
|
||
<a href="#opentabwithnote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>open<wbr/>Tab<wbr/>With<wbr/>Note</span></a>
|
||
<a href="#refreshincludednote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>refresh<wbr/>Included<wbr/>Note</span></a>
|
||
<a href="#reloadnotes" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reload<wbr/>Notes</span></a>
|
||
<a href="#runasynconbackendwithmanualtransactionhandling" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>Async<wbr/>On<wbr/>Backend<wbr/>With<wbr/>Manual<wbr/>Transaction<wbr/>Handling</span></a>
|
||
<a href="#runonbackend" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>On<wbr/>Backend</span></a>
|
||
<a href="#searchfornote" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>search<wbr/>For<wbr/>Note</span></a>
|
||
<a href="#searchfornotes" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>search<wbr/>For<wbr/>Notes</span></a>
|
||
<a href="#sethoistednoteid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Hoisted<wbr/>Note<wbr/>Id</span></a>
|
||
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="container"><span>$container</span><a href="#container" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">$container</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Container of all the rendered script content</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L66">src/public/app/services/frontend_script_api.ts:66</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="basicwidget"><span>Basic<wbr/>Widget</span><a href="#basicwidget" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">BasicWidget</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="../classes/Frontend_Script_API.BasicWidget.html" class="tsd-signature-type tsd-kind-class">BasicWidget</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L92">src/public/app/services/frontend_script_api.ts:92</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="bindglobalshortcut"><span>bind<wbr/>Global<wbr/>Shortcut</span><a href="#bindglobalshortcut" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bindGlobalShortcut</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">keyboardShortcut</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">handler</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Frontend_Script_API._internal_.Handler.html" class="tsd-signature-type tsd-kind-type-alias">Handler</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">namespace</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">keyboardShortcut</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">handler</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Frontend_Script_API._internal_.Handler.html" class="tsd-signature-type tsd-kind-type-alias">Handler</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">namespace</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">keyboardShortcut</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>e.g. "ctrl+shift+a"</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">handler</span>: <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Frontend_Script_API._internal_.Handler.html" class="tsd-signature-type tsd-kind-type-alias">Handler</a></span></li><li><span><span class="tsd-kind-parameter">namespace</span>: <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = null</span></span><div class="tsd-comment tsd-typography"><p>specify namespace of the handler for the cases where call for bind may be repeated.
|
||
If a handler with this ID exists, it's replaced by the new handler.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L412">src/public/app/services/frontend_script_api.ts:412</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="createlink"><span>create<wbr/>Link</span><a href="#createlink" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">createLink</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="Frontend_Script_API._internal_.CreateLinkOptions.html" class="tsd-signature-type tsd-kind-interface">CreateLinkOptions</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Create a note link (jQuery object) for given note.</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="Frontend_Script_API._internal_.CreateLinkOptions.html" class="tsd-signature-type tsd-kind-interface">CreateLinkOptions</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">notePath</span>: <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>(or noteId)</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="Frontend_Script_API._internal_.CreateLinkOptions.html" class="tsd-signature-type tsd-kind-interface">CreateLinkOptions</a><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><ul>
|
||
<li>jQuery element with the link (wrapped in <span>)</li>
|
||
</ul>
|
||
<div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L263">src/public/app/services/frontend_script_api.ts:263</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="createnotelink"><span class="deprecated">create<wbr/>Note<wbr/>Link</span><a href="#createnotelink" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">createNoteLink</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="Frontend_Script_API._internal_.CreateLinkOptions.html" class="tsd-signature-type tsd-kind-interface">CreateLinkOptions</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-deprecated"><h4 class="tsd-anchor-link" id="deprecated">Deprecated<a href="#deprecated" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><ul>
|
||
<li>use api.createLink() instead</li>
|
||
</ul>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L266">src/public/app/services/frontend_script_api.ts:266</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="currentnote"><span>current<wbr/>Note</span><a href="#currentnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">currentNote</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a></div><div class="tsd-comment tsd-typography"><p>Note where the script is currently executing, i.e. the note where the currently executing source code is written.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L76">src/public/app/services/frontend_script_api.ts:76</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="dayjs"><span>dayjs</span><a href="#dayjs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">dayjs</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">__module</span></div><div class="tsd-comment tsd-typography"><p>day.js library for date manipulation.
|
||
See <a href="https://day.js.org">https://day.js.org</a> for documentation</p>
|
||
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link" id="see">See<a href="#see" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://day.js.org">https://day.js.org</a></p>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L88">src/public/app/services/frontend_script_api.ts:88</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="formatdateiso"><span>format<wbr/>DateISO</span><a href="#formatdateiso" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">formatDateISO</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>this is producing local time! *</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">date</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-returns"><h4 class="tsd-anchor-link" id="returns">Returns<a href="#returns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>date in YYYY-MM-DD format</p>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L209">src/public/app/services/frontend_script_api.ts:209</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="formatnotesize"><span class="deprecated">format<wbr/>Note<wbr/>Size</span><a href="#formatnotesize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">formatNoteSize</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">size</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>in bytes</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>formatted string</p>
|
||
<div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-deprecated"><h4 class="tsd-anchor-link" id="deprecated-1">Deprecated<a href="#deprecated-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><ul>
|
||
<li>use api.formatSize()</li>
|
||
</ul>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L450">src/public/app/services/frontend_script_api.ts:450</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="formatsize"><span>format<wbr/>Size</span><a href="#formatsize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">formatSize</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">size</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>in bytes</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>formatted string</p>
|
||
<div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L443">src/public/app/services/frontend_script_api.ts:443</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getdaynote"><span>get<wbr/>Day<wbr/>Note</span><a href="#getdaynote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getDayNote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Returns day note for a given date. If it doesn't exist, it is automatically created.</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">date</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>e.g. "2019-04-29"</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L359">src/public/app/services/frontend_script_api.ts:359</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getmonthnote"><span>get<wbr/>Month<wbr/>Note</span><a href="#getmonthnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getMonthNote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">month</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Returns month-note. If it doesn't exist, it is automatically created.</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">month</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">month</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>e.g. "2019-04"</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L381">src/public/app/services/frontend_script_api.ts:381</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getquarternote"><span>get<wbr/>Quarter<wbr/>Note</span><a href="#getquarternote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getQuarterNote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">quarter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Returns quarter note for given date. If such a note doesn't exist, it is automatically created.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L389">src/public/app/services/frontend_script_api.ts:389</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="gettodaynote"><span>get<wbr/>Today<wbr/>Note</span><a href="#gettodaynote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getTodayNote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Returns date-note for today. If it doesn't exist, it is automatically created.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L352">src/public/app/services/frontend_script_api.ts:352</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getweekfirstdaynote"><span>get<wbr/>Week<wbr/>First<wbr/>Day<wbr/>Note</span><a href="#getweekfirstdaynote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getWeekFirstDayNote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Returns day note for the first date of the week of the given date. If it doesn't exist, it is automatically created.</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">date</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>e.g. "2019-04-29"</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L366">src/public/app/services/frontend_script_api.ts:366</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getweeknote"><span>get<wbr/>Week<wbr/>Note</span><a href="#getweeknote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getWeekNote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">week</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Returns week note for given date. If such a note doesn't exist, it is automatically created.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L374">src/public/app/services/frontend_script_api.ts:374</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getyearnote"><span>get<wbr/>Year<wbr/>Note</span><a href="#getyearnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getYearNote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">year</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Returns year-note. If it doesn't exist, it is automatically created.</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">year</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">year</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>e.g. "2019"</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-method"><h4 class="tsd-anchor-link" id="method">Method<a href="#method" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L398">src/public/app/services/frontend_script_api.ts:398</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="logmessages"><span>log<wbr/>Messages</span><a href="#logmessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">logMessages</span><span class="tsd-signature-symbol">:</span> <a href="../types/Backend_Script_API._internal_.Record.html" class="tsd-signature-type tsd-kind-type-alias">Record</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L452">src/public/app/services/frontend_script_api.ts:452</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="logspacedupdates"><span>log<wbr/>Spaced<wbr/>Updates</span><a href="#logspacedupdates" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">logSpacedUpdates</span><span class="tsd-signature-symbol">:</span> <a href="../types/Backend_Script_API._internal_.Record.html" class="tsd-signature-type tsd-kind-type-alias">Record</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <a href="../classes/Frontend_Script_API._internal_.default-3.html" class="tsd-signature-type tsd-kind-class">default</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L453">src/public/app/services/frontend_script_api.ts:453</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="notecontextawarewidget"><span>Note<wbr/>Context<wbr/>Aware<wbr/>Widget</span><a href="#notecontextawarewidget" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">NoteContextAwareWidget</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="../classes/Frontend_Script_API.NoteContextAwareWidget.html" class="tsd-signature-type tsd-kind-class">NoteContextAwareWidget</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L91">src/public/app/services/frontend_script_api.ts:91</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="originentity"><span>origin<wbr/>Entity</span><a href="#originentity" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">originEntity</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span></div><div class="tsd-comment tsd-typography"><p>Entity whose event triggered this execution.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L81">src/public/app/services/frontend_script_api.ts:81</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="parsedate"><span>parse<wbr/>Date</span><a href="#parsedate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">parseDate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Date</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L211">src/public/app/services/frontend_script_api.ts:211</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="protectnote"><span>protect<wbr/>Note</span><a href="#protectnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">protectNote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">protect</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">includingSubtree</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">protect</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">includingSubtree</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">noteId</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">protect</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>true to protect note, false to unprotect</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">includingSubtree</span>: <span class="tsd-signature-type">boolean</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L341">src/public/app/services/frontend_script_api.ts:341</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="protectsubtree"><span>protect<wbr/>Sub<wbr/>Tree</span><a href="#protectsubtree" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">protectSubTree</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">protect</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">includingSubtree</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">protect</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">includingSubtree</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">noteId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">protect</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>true to protect subtree, false to unprotect</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">includingSubtree</span>: <span class="tsd-signature-type">boolean</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L347">src/public/app/services/frontend_script_api.ts:347</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="randomstring"><span>random<wbr/>String</span><a href="#randomstring" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">randomString</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">len</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Return randomly generated string of given length. This random string generation is NOT cryptographically secure.</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">len</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">len</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>random string</p>
|
||
<div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-method"><h4 class="tsd-anchor-link" id="method-1">Method<a href="#method-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L437">src/public/app/services/frontend_script_api.ts:437</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="rightpanelwidget"><span>Right<wbr/>Panel<wbr/>Widget</span><a href="#rightpanelwidget" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">RightPanelWidget</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="../classes/Frontend_Script_API.RightPanelWidget.html" class="tsd-signature-type tsd-kind-class">RightPanelWidget</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L90">src/public/app/services/frontend_script_api.ts:90</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="setupelementtooltip"><span>setup<wbr/>Element<wbr/>Tooltip</span><a href="#setupelementtooltip" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">setupElementTooltip</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">$el</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">$el</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">$el</span>: <span class="tsd-signature-type">JQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>jquery object on which to set up the tooltip</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L336">src/public/app/services/frontend_script_api.ts:336</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="showconfirmdialog"><span>show<wbr/>Confirm<wbr/>Dialog</span><a href="#showconfirmdialog" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">showConfirmDialog</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Show confirm dialog to the user.</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></h4><p>promise resolving to true if the user confirmed</p>
|
||
<div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L232">src/public/app/services/frontend_script_api.ts:232</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="showerror"><span>show<wbr/>Error</span><a href="#showerror" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">showError</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">delay</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Show an error toast message to the user.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L221">src/public/app/services/frontend_script_api.ts:221</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="showinfodialog"><span>show<wbr/>Info<wbr/>Dialog</span><a href="#showinfodialog" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">showInfoDialog</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Show an info dialog to the user.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L226">src/public/app/services/frontend_script_api.ts:226</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="showmessage"><span>show<wbr/>Message</span><a href="#showmessage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">showMessage</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">delay</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Show an info toast message to the user.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L216">src/public/app/services/frontend_script_api.ts:216</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="showpromptdialog"><span>show<wbr/>Prompt<wbr/>Dialog</span><a href="#showpromptdialog" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">showPromptDialog</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">props</span><span class="tsd-signature-symbol">:</span> <a href="Frontend_Script_API._internal_.PromptDialogOptions.html" class="tsd-signature-type tsd-kind-interface">PromptDialogOptions</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Show prompt dialog to the user.</p>
|
||
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">props</span><span class="tsd-signature-symbol">:</span> <a href="Frontend_Script_API._internal_.PromptDialogOptions.html" class="tsd-signature-type tsd-kind-interface">PromptDialogOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">props</span>: <a href="Frontend_Script_API._internal_.PromptDialogOptions.html" class="tsd-signature-type tsd-kind-interface">PromptDialogOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4><p>promise resolving to the answer provided by the user</p>
|
||
<div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L239">src/public/app/services/frontend_script_api.ts:239</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="startnote"><span>start<wbr/>Note</span><a href="#startnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">startNote</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a></div><div class="tsd-comment tsd-typography"><p>Note where the script started executing, i.e., the (event) entrypoint of the current script execution.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L71">src/public/app/services/frontend_script_api.ts:71</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="triggercommand"><span>trigger<wbr/>Command</span><a href="#triggercommand" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">triggerCommand</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">keyof</span> <a href="../types/Frontend_Script_API._internal_.CommandMappings.html" class="tsd-signature-type tsd-kind-type-alias">CommandMappings</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">_data</span><span class="tsd-signature-symbol">?:</span> <a href="../types/Frontend_Script_API._internal_.CommandMappings.html" class="tsd-signature-type tsd-kind-type-alias">CommandMappings</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Trigger command. This is a very low-level API which should be avoided if possible.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L244">src/public/app/services/frontend_script_api.ts:244</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="triggerevent"><span>trigger<wbr/>Event</span><a href="#triggerevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">triggerEvent</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">extends</span> <a href="../types/Frontend_Script_API._internal_.EventNames.html" class="tsd-signature-type tsd-kind-type-alias">EventNames</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/Frontend_Script_API._internal_.EventData.html" class="tsd-signature-type tsd-kind-type-alias">EventData</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Trigger event. This is a very low-level API which should be avoided if possible.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L249">src/public/app/services/frontend_script_api.ts:249</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="waituntilsynced"><span>wait<wbr/>Until<wbr/>Synced</span><a href="#waituntilsynced" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">waitUntilSynced</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Trilium runs in a backend and frontend process, when something is changed on the backend from a script,
|
||
frontend will get asynchronously synchronized.</p>
|
||
<p>This method returns a promise which resolves once all the backend -> frontend synchronization is finished.
|
||
Typical use case is when a new note has been created, we should wait until it is synced into frontend and only then activate it.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L421">src/public/app/services/frontend_script_api.ts:421</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Methods</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="activatenewnote"><span>activate<wbr/>New<wbr/>Note</span><a href="#activatenewnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="activatenewnote-1"><span class="tsd-kind-call-signature">activateNewNote</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#activatenewnote-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Activates newly created note. Compared to this.activateNote() also makes sure that frontend has been fully synced.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">notePath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>(or noteId)</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L106">src/public/app/services/frontend_script_api.ts:106</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="activatenote"><span>activate<wbr/>Note</span><a href="#activatenote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="activatenote-1"><span class="tsd-kind-call-signature">activateNote</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#activatenote-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Activates note in the tree and in the note detail.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">notePath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>(or noteId)</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L99">src/public/app/services/frontend_script_api.ts:99</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="addbuttontotoolbar"><span class="deprecated">add<wbr/>Button<wbr/>To<wbr/>Toolbar</span><a href="#addbuttontotoolbar" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="addbuttontotoolbar-1"><span class="tsd-kind-call-signature">addButtonToToolbar</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">:</span> <a href="Frontend_Script_API._internal_.AddToToolbarOpts.html" class="tsd-signature-type tsd-kind-interface">AddToToolbarOpts</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#addbuttontotoolbar-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">opts</span>: <a href="Frontend_Script_API._internal_.AddToToolbarOpts.html" class="tsd-signature-type tsd-kind-interface">AddToToolbarOpts</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-method"><h4 class="tsd-anchor-link" id="method-2">Method<a href="#method-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div><div class="tsd-tag-deprecated"><h4 class="tsd-anchor-link" id="deprecated-2">Deprecated<a href="#deprecated-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>you can now create/modify launchers in the top-left Menu -> Configure Launchbar
|
||
for special needs there's also backend API's createOrUpdateLauncher()</p>
|
||
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L132">src/public/app/services/frontend_script_api.ts:132</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="addtexttoactivecontexteditor"><span>add<wbr/>Text<wbr/>To<wbr/>Active<wbr/>Context<wbr/>Editor</span><a href="#addtexttoactivecontexteditor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="addtexttoactivecontexteditor-1"><span class="tsd-kind-call-signature">addTextToActiveContextEditor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">text</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#addtexttoactivecontexteditor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds given text to the editor cursor</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">text</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>this must be clear text, HTML is not supported.</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L273">src/public/app/services/frontend_script_api.ts:273</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getactivecontext"><span>get<wbr/>Active<wbr/>Context</span><a href="#getactivecontext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getactivecontext-1"><span class="tsd-kind-call-signature">getActiveContext</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><a href="#getactivecontext-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a></h4><p>returns active context (split)</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L283">src/public/app/services/frontend_script_api.ts:283</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getactivecontextcodeeditor"><span>get<wbr/>Active<wbr/>Context<wbr/>Code<wbr/>Editor</span><a href="#getactivecontextcodeeditor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getactivecontextcodeeditor-1"><span class="tsd-kind-call-signature">getActiveContextCodeEditor</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><a href="#getactivecontextcodeeditor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>See <a href="https://codemirror.net/doc/manual.html#api">https://codemirror.net/doc/manual.html#api</a></p>
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></h4><p>instance of CodeMirror</p>
|
||
<div class="tsd-comment tsd-typography"><div class="tsd-tag-method"><h4 class="tsd-anchor-link" id="method-3">Method<a href="#method-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L313">src/public/app/services/frontend_script_api.ts:313</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getactivecontextnote"><span>get<wbr/>Active<wbr/>Context<wbr/>Note</span><a href="#getactivecontextnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getactivecontextnote-1"><span class="tsd-kind-call-signature">getActiveContextNote</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><a href="#getactivecontextnote-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a></h4><p>active note (loaded into center pane)</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L278">src/public/app/services/frontend_script_api.ts:278</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getactivecontextnotepath"><span>get<wbr/>Active<wbr/>Context<wbr/>Note<wbr/>Path</span><a href="#getactivecontextnotepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getactivecontextnotepath-1"><span class="tsd-kind-call-signature">getActiveContextNotePath</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span><a href="#getactivecontextnotepath-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">string</span></h4><p>returns a note path of active note or null if there isn't active note</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L323">src/public/app/services/frontend_script_api.ts:323</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getactivecontexttexteditor"><span>get<wbr/>Active<wbr/>Context<wbr/>Text<wbr/>Editor</span><a href="#getactivecontexttexteditor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getactivecontexttexteditor-1"><span class="tsd-kind-call-signature">getActiveContextTextEditor</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><a href="#getactivecontexttexteditor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>See <a href="https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html">https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html</a> for documentation on the returned instance.</p>
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></h4><p>instance of CKEditor</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L305">src/public/app/services/frontend_script_api.ts:305</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getactivemaincontext"><span>get<wbr/>Active<wbr/>Main<wbr/>Context</span><a href="#getactivemaincontext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getactivemaincontext-1"><span class="tsd-kind-call-signature">getActiveMainContext</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><a href="#getactivemaincontext-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a></h4><p>returns active main context (first split in a tab, represents the tab as a whole)</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L288">src/public/app/services/frontend_script_api.ts:288</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getactivenotedetailwidget"><span>get<wbr/>Active<wbr/>Note<wbr/>Detail<wbr/>Widget</span><a href="#getactivenotedetailwidget" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getactivenotedetailwidget-1"><span class="tsd-kind-call-signature">getActiveNoteDetailWidget</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API._internal_.default-2.html" class="tsd-signature-type tsd-kind-class">default</a><span class="tsd-signature-symbol">></span><a href="#getactivenotedetailwidget-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Get access to the widget handling note detail. Methods like <code>getWidgetType()</code> and <code>getTypeWidget()</code> to get to the
|
||
implementation of actual widget type.</p>
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API._internal_.default-2.html" class="tsd-signature-type tsd-kind-class">default</a><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L319">src/public/app/services/frontend_script_api.ts:319</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getcomponentbyel"><span>get<wbr/>Component<wbr/>By<wbr/>El</span><a href="#getcomponentbyel" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getcomponentbyel-1"><span class="tsd-kind-call-signature">getComponentByEl</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">el</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.default.html" class="tsd-signature-type tsd-kind-class">default</a><a href="#getcomponentbyel-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns component which owns the given DOM element (the nearest parent component in DOM tree)</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">el</span>: <span class="tsd-signature-type">HTMLElement</span></span><div class="tsd-comment tsd-typography"><p>DOM element</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../classes/Frontend_Script_API._internal_.default.html" class="tsd-signature-type tsd-kind-class">default</a></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-method"><h4 class="tsd-anchor-link" id="method-4">Method<a href="#method-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L331">src/public/app/services/frontend_script_api.ts:331</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getinstancename"><span>get<wbr/>Instance<wbr/>Name</span><a href="#getinstancename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getinstancename-1"><span class="tsd-kind-call-signature">getInstanceName</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#getinstancename-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Instance name identifies particular Trilium instance. It can be useful for scripts
|
||
if some action needs to happen on only one specific instance.</p>
|
||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L204">src/public/app/services/frontend_script_api.ts:204</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getmainnotecontexts"><span>get<wbr/>Main<wbr/>Note<wbr/>Contexts</span><a href="#getmainnotecontexts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getmainnotecontexts-1"><span class="tsd-kind-call-signature">getMainNoteContexts</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><span class="tsd-signature-symbol">[]</span><a href="#getmainnotecontexts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><span class="tsd-signature-symbol">[]</span></h4><p>returns all main contexts representing tabs</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L298">src/public/app/services/frontend_script_api.ts:298</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getnote"><span>get<wbr/>Note</span><a href="#getnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getnote-1"><span class="tsd-kind-call-signature">getNote</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><a href="#getnote-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns note by given noteId. If note is missing from the cache, it's loaded.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">noteId</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L183">src/public/app/services/frontend_script_api.ts:183</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getnotecontexts"><span>get<wbr/>Note<wbr/>Contexts</span><a href="#getnotecontexts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getnotecontexts-1"><span class="tsd-kind-call-signature">getNoteContexts</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><span class="tsd-signature-symbol">[]</span><a href="#getnotecontexts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="../classes/Frontend_Script_API._internal_.NoteContext.html" class="tsd-signature-type tsd-kind-class">NoteContext</a><span class="tsd-signature-symbol">[]</span></h4><p>returns all note contexts (splits) in all tabs</p>
|
||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L293">src/public/app/services/frontend_script_api.ts:293</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getnotes"><span>get<wbr/>Notes</span><a href="#getnotes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getnotes-1"><span class="tsd-kind-call-signature">getNotes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteIds</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">silentNotFoundError</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#getnotes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns list of notes. If note is missing from the cache, it's loaded.</p>
|
||
<p>This is often used to bulk-fill the cache with notes which would have to be picked one by one
|
||
otherwise (by e.g. createLink())</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">noteIds</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">silentNotFoundError</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>don't report error if the note is not found</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L193">src/public/app/services/frontend_script_api.ts:193</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="log"><span>log</span><a href="#log" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="log-1"><span class="tsd-kind-call-signature">log</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#log-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Log given message to the log pane in UI</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L458">src/public/app/services/frontend_script_api.ts:458</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="opensplitwithnote"><span>open<wbr/>Split<wbr/>With<wbr/>Note</span><a href="#opensplitwithnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="opensplitwithnote-1"><span class="tsd-kind-call-signature">openSplitWithNote</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">activate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#opensplitwithnote-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Open a note in a new split.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">notePath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>(or noteId)</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">activate</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>set to true to activate the new split, false to stay on the current split</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L123">src/public/app/services/frontend_script_api.ts:123</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="opentabwithnote"><span>open<wbr/>Tab<wbr/>With<wbr/>Note</span><a href="#opentabwithnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="opentabwithnote-1"><span class="tsd-kind-call-signature">openTabWithNote</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">activate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#opentabwithnote-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Open a note in a new tab.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">notePath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>(or noteId)</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">activate</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>set to true to activate the new tab, false to stay on the current tab</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-method"><h4 class="tsd-anchor-link" id="method-5">Method<a href="#method-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L115">src/public/app/services/frontend_script_api.ts:115</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="refreshincludednote"><span>refresh<wbr/>Included<wbr/>Note</span><a href="#refreshincludednote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="refreshincludednote-1"><span class="tsd-kind-call-signature">refreshIncludedNote</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">includedNoteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#refreshincludednote-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>This will refresh all currently opened notes which have included note specified in the parameter</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">includedNoteId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>noteId of the included note</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L428">src/public/app/services/frontend_script_api.ts:428</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="reloadnotes"><span>reload<wbr/>Notes</span><a href="#reloadnotes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="reloadnotes-1"><span class="tsd-kind-call-signature">reloadNotes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteIds</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#reloadnotes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Update frontend tree (note) cache from the backend.</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">noteIds</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L198">src/public/app/services/frontend_script_api.ts:198</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="runasynconbackendwithmanualtransactionhandling"><span>run<wbr/>Async<wbr/>On<wbr/>Backend<wbr/>With<wbr/>Manual<wbr/>Transaction<wbr/>Handling</span><a href="#runasynconbackendwithmanualtransactionhandling" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="runasynconbackendwithmanualtransactionhandling-1"><span class="tsd-kind-call-signature">runAsyncOnBackendWithManualTransactionHandling</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">func</span><span class="tsd-signature-symbol">:</span> <a href="../types/Frontend_Script_API._internal_.Func.html" class="tsd-signature-type tsd-kind-type-alias">Func</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><a href="#runasynconbackendwithmanualtransactionhandling-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Executes given anonymous function on the backend.
|
||
Internally this serializes the anonymous function into string and sends it to backend via AJAX.
|
||
This function is meant for advanced needs where an async function is necessary.
|
||
In this case, the automatic request-scoped transaction management is not applied,
|
||
and you need to manually define transaction via api.transactional().</p>
|
||
<p>If you have a synchronous function, please use api.runOnBackend().</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">func</span>: <a href="../types/Frontend_Script_API._internal_.Func.html" class="tsd-signature-type tsd-kind-type-alias">Func</a></span><div class="tsd-comment tsd-typography"><p>(synchronous) function to be executed on the backend</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">params</span>: <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>list of parameters to the anonymous function to be sent to backend</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">unknown</span></h4><p>return value of the executed function on the backend</p>
|
||
<div class="tsd-comment tsd-typography"><div class="tsd-tag-method"><h4 class="tsd-anchor-link" id="method-6">Method<a href="#method-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L166">src/public/app/services/frontend_script_api.ts:166</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="runonbackend"><span>run<wbr/>On<wbr/>Backend</span><a href="#runonbackend" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="runonbackend-1"><span class="tsd-kind-call-signature">runOnBackend</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">func</span><span class="tsd-signature-symbol">:</span> <a href="../types/Frontend_Script_API._internal_.Func.html" class="tsd-signature-type tsd-kind-type-alias">Func</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><a href="#runonbackend-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Executes given anonymous function on the backend.
|
||
Internally this serializes the anonymous function into string and sends it to backend via AJAX.
|
||
Please make sure that the supplied function is synchronous. Only sync functions will work correctly
|
||
with transaction management. If you really know what you're doing, you can call api.runAsyncOnBackendWithManualTransactionHandling()</p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">func</span>: <a href="../types/Frontend_Script_API._internal_.Func.html" class="tsd-signature-type tsd-kind-type-alias">Func</a></span><div class="tsd-comment tsd-typography"><p>(synchronous) function to be executed on the backend</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">params</span>: <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>list of parameters to the anonymous function to be sent to backend</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">unknown</span></h4><p>return value of the executed function on the backend</p>
|
||
<div class="tsd-comment tsd-typography"><div class="tsd-tag-method"><h4 class="tsd-anchor-link" id="method-7">Method<a href="#method-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L150">src/public/app/services/frontend_script_api.ts:150</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="searchfornote"><span>search<wbr/>For<wbr/>Note</span><a href="#searchfornote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="searchfornote-1"><span class="tsd-kind-call-signature">searchForNote</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">searchString</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span><a href="#searchfornote-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>This is a powerful search method - you can search by attributes and their values, e.g.:
|
||
"#dateModified =* MONTH AND #log". See full documentation for all options at: <a href="https://triliumnext.github.io/Docs/Wiki/search.html">https://triliumnext.github.io/Docs/Wiki/search.html</a></p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">searchString</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">|</span> <a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L178">src/public/app/services/frontend_script_api.ts:178</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="searchfornotes"><span>search<wbr/>For<wbr/>Notes</span><a href="#searchfornotes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="searchfornotes-1"><span class="tsd-kind-call-signature">searchForNotes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">searchString</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#searchfornotes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>This is a powerful search method - you can search by attributes and their values, e.g.:
|
||
"#dateModified =* MONTH AND #log". See full documentation for all options at: <a href="https://triliumnext.github.io/Docs/Wiki/search.html">https://triliumnext.github.io/Docs/Wiki/search.html</a></p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">searchString</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../classes/Frontend_Script_API.FNote.html" class="tsd-signature-type tsd-kind-class">FNote</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L172">src/public/app/services/frontend_script_api.ts:172</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="sethoistednoteid"><span>set<wbr/>Hoisted<wbr/>Note<wbr/>Id</span><a href="#sethoistednoteid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="sethoistednoteid-1"><span class="tsd-kind-call-signature">setHoistedNoteId</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">noteId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#sethoistednoteid-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Hoist note in the current tab. See <a href="https://triliumnext.github.io/Docs/Wiki/note-hoisting.html">https://triliumnext.github.io/Docs/Wiki/note-hoisting.html</a></p>
|
||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">noteId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>set hoisted note. 'root' will effectively unhoist</p>
|
||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/TriliumNext/Notes/blob/84c2ebd7f3245ef3f6cddc8669bb5117079e316c/src/public/app/services/frontend_script_api.ts#L405">src/public/app/services/frontend_script_api.ts:405</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#container"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$container</span></a><a href="#basicwidget"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Basic<wbr/>Widget</span></a><a href="#bindglobalshortcut"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bind<wbr/>Global<wbr/>Shortcut</span></a><a href="#createlink"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>create<wbr/>Link</span></a><a href="#createnotelink"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>create<wbr/>Note<wbr/>Link</span></a><a href="#currentnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>current<wbr/>Note</span></a><a href="#dayjs"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dayjs</span></a><a href="#formatdateiso"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>format<wbr/>DateISO</span></a><a href="#formatnotesize"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>format<wbr/>Note<wbr/>Size</span></a><a href="#formatsize"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>format<wbr/>Size</span></a><a href="#getdaynote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Day<wbr/>Note</span></a><a href="#getmonthnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Month<wbr/>Note</span></a><a href="#getquarternote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Quarter<wbr/>Note</span></a><a href="#gettodaynote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Today<wbr/>Note</span></a><a href="#getweekfirstdaynote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Week<wbr/>First<wbr/>Day<wbr/>Note</span></a><a href="#getweeknote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Week<wbr/>Note</span></a><a href="#getyearnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Year<wbr/>Note</span></a><a href="#logmessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>log<wbr/>Messages</span></a><a href="#logspacedupdates"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>log<wbr/>Spaced<wbr/>Updates</span></a><a href="#notecontextawarewidget"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Note<wbr/>Context<wbr/>Aware<wbr/>Widget</span></a><a href="#originentity"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>origin<wbr/>Entity</span></a><a href="#parsedate"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>parse<wbr/>Date</span></a><a href="#protectnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>protect<wbr/>Note</span></a><a href="#protectsubtree"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>protect<wbr/>Sub<wbr/>Tree</span></a><a href="#randomstring"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>random<wbr/>String</span></a><a href="#rightpanelwidget"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Right<wbr/>Panel<wbr/>Widget</span></a><a href="#setupelementtooltip"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>setup<wbr/>Element<wbr/>Tooltip</span></a><a href="#showconfirmdialog"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Confirm<wbr/>Dialog</span></a><a href="#showerror"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Error</span></a><a href="#showinfodialog"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Info<wbr/>Dialog</span></a><a href="#showmessage"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Message</span></a><a href="#showpromptdialog"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>show<wbr/>Prompt<wbr/>Dialog</span></a><a href="#startnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>start<wbr/>Note</span></a><a href="#triggercommand"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>trigger<wbr/>Command</span></a><a href="#triggerevent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>trigger<wbr/>Event</span></a><a href="#waituntilsynced"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>wait<wbr/>Until<wbr/>Synced</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#activatenewnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>activate<wbr/>New<wbr/>Note</span></a><a href="#activatenote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>activate<wbr/>Note</span></a><a href="#addbuttontotoolbar"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Button<wbr/>To<wbr/>Toolbar</span></a><a href="#addtexttoactivecontexteditor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Text<wbr/>To<wbr/>Active<wbr/>Context<wbr/>Editor</span></a><a href="#getactivecontext"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context</span></a><a href="#getactivecontextcodeeditor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context<wbr/>Code<wbr/>Editor</span></a><a href="#getactivecontextnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context<wbr/>Note</span></a><a href="#getactivecontextnotepath"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context<wbr/>Note<wbr/>Path</span></a><a href="#getactivecontexttexteditor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Context<wbr/>Text<wbr/>Editor</span></a><a href="#getactivemaincontext"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Main<wbr/>Context</span></a><a href="#getactivenotedetailwidget"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Active<wbr/>Note<wbr/>Detail<wbr/>Widget</span></a><a href="#getcomponentbyel"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Component<wbr/>By<wbr/>El</span></a><a href="#getinstancename"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Instance<wbr/>Name</span></a><a href="#getmainnotecontexts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Main<wbr/>Note<wbr/>Contexts</span></a><a href="#getnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Note</span></a><a href="#getnotecontexts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Note<wbr/>Contexts</span></a><a href="#getnotes"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Notes</span></a><a href="#log"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>log</span></a><a href="#opensplitwithnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>open<wbr/>Split<wbr/>With<wbr/>Note</span></a><a href="#opentabwithnote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>open<wbr/>Tab<wbr/>With<wbr/>Note</span></a><a href="#refreshincludednote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>refresh<wbr/>Included<wbr/>Note</span></a><a href="#reloadnotes"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reload<wbr/>Notes</span></a><a href="#runasynconbackendwithmanualtransactionhandling"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>Async<wbr/>On<wbr/>Backend<wbr/>With<wbr/>Manual<wbr/>Transaction<wbr/>Handling</span></a><a href="#runonbackend"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>On<wbr/>Backend</span></a><a href="#searchfornote"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>search<wbr/>For<wbr/>Note</span></a><a href="#searchfornotes"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>search<wbr/>For<wbr/>Notes</span></a><a href="#sethoistednoteid"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Hoisted<wbr/>Note<wbr/>Id</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">trilium</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|