Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix ctrl+enter navigation for reference links, closes #2932
zadam2e1bef2df76f
diff --git a/docs/frontend_api/module.exports.html b/docs/frontend_api/module.exports.htmlnew file mode 100644index 0000000000..1f1bd88529--- /dev/null+++ b/docs/frontend_api/module.exports.html@@ -0,0 +1,170 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <title>JSDoc: Class: exports</title>++ <script src="scripts/prettify/prettify.js"> </script>+ <script src="scripts/prettify/lang-css.js"> </script>+ <!--[if lt IE 9]>+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>+ <![endif]-->+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">+</head>++<body>++<div id="main">++ <h1 class="page-title">Class: exports</h1>+++++++<section>++<header>++ <h2><span class="attribs"><span class="type-signature"></span></span>exports<span class="signature">()</span><span class="type-signature"></span></h2>++ <div class="class-description">TODO: rename, it's not collapsible anymore</div>+++</header>++<article>+ <div class="container-overview">+++++ <h2>Constructor</h2>++++ <h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="widgets_collapsible_widget.js.html">widgets/collapsible_widget.js</a>, <a href="widgets_collapsible_widget.js.html#line15">line 15</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++++ </div>+++++++++++++++++++++</article>++</section>+++++</div>++<nav>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+</nav>++<br class="clear">++<footer>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a>+</footer>++<script> prettyPrint(); </script>+<script src="scripts/linenumber.js"> </script>+</body>+</html>\ No newline at end of filediff --git a/src/public/app/widgets/dialogs/options/appearance.js b/src/public/app/widgets/dialogs/options/appearance.jsindex 5393e857f6..5144772288 100644--- a/src/public/app/widgets/dialogs/options/appearance.js+++ b/src/public/app/widgets/dialogs/options/appearance.js@@ -136,7 +136,7 @@ const TPL = `</div></div>- <h5>Monospace font</h5>+ <h5>Monospace (code) font</h5><div class="form-group row"><div class="col-4">diff --git a/src/public/app/widgets/type_widgets/editable_text.js b/src/public/app/widgets/type_widgets/editable_text.jsindex b360486116..bdd7573dfc 100644--- a/src/public/app/widgets/type_widgets/editable_text.js+++ b/src/public/app/widgets/type_widgets/editable_text.js@@ -266,10 +266,25 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {await this.initialized;const selection = this.textEditor.model.document.selection;- if (!selection.hasAttribute('linkHref')) return;+ const selectedElement = selection.getSelectedElement();++ if (selectedElement?.name === 'reference') {+ // reference link+ const notePath = selectedElement.getAttribute('notePath');++ if (notePath) {+ await appContext.tabManager.getActiveContext().setNote(notePath);+ return;+ }+ }++ if (!selection.hasAttribute('linkHref')) {+ return;+ }const selectedLinkUrl = selection.getAttribute('linkHref');const notePath = link.getNotePathFromUrl(selectedLinkUrl);+if (notePath) {await appContext.tabManager.getActiveContext().setNote(notePath);} else {