Skip to content

Build your personal knowledge base with Trilium Notes

Merge branch 'beta'

zadam90fc4b829371
diff --cc src/public/app/services/frontend_script_api.js
index 4c6807e6e4,9dd198a153..6c9ef86360
--- a/src/public/app/services/frontend_script_api.js
+++ b/src/public/app/services/frontend_script_api.js
@@@ -34,44 -22,26 +34,44 @@@ import shortcutService from "./shortcut
* @constructor
*/
function FrontendScriptApi(startNote, currentNote, originEntity = null, $container = null) {
- /**
- /** @property {jQuery} container of all the rendered script content */
++ /**
+ * Container of all the rendered script content
+ * @type {jQuery}
+ * */
this.$container = $container;
- /** @property {object} note where the script started executing */
+ /**
+ * Note where the script started executing
+ * @type {FNote}
+ */
this.startNote = startNote;
- /** @property {object} note where the script is currently executing */
+
+ /**
+ * Note where the script is currently executing
+ * @type {FNote}
+ */
this.currentNote = currentNote;
- /**
- /** @property {object|null} entity whose event triggered this execution */
++ /**
+ * Entity whose event triggered this execution
+ * @type {object|null}
+ */
this.originEntity = originEntity;
- /** @property {dayjs} day.js library for date manipulation. See {@link https://day.js.org} for documentation */
+ /**
+ * day.js library for date manipulation.
+ * See {@link https://day.js.org} for documentation
+ * @see https://day.js.org
+ * @type {dayjs}
+ */
this.dayjs = dayjs;
- /** @property {RightPanelWidget} */
+ /** @type {RightPanelWidget} */
this.RightPanelWidget = RightPanelWidget;
- /** @property {NoteContextAwareWidget} */
+ /** @type {NoteContextAwareWidget} */
this.NoteContextAwareWidget = NoteContextAwareWidget;
- /** @property {BasicWidget} */
+ /** @type {BasicWidget} */
this.BasicWidget = BasicWidget;
/**
@@@ -330,7 -300,8 +330,9 @@@
* @param {boolean} [params.showTooltip=true] - enable/disable tooltip on the link
* @param {boolean} [params.showNotePath=false] - show also whole note's path as part of the link
* @param {boolean} [params.showNoteIcon=false] - show also note icon before the title
+ * @param {string} [params.title] - custom link tile with note's title as default
+ * @param {string} [params.title=] - custom link tile with note's title as default
+ * @returns {jQuery} - jQuery element with the link (wrapped in <span>)
*/
this.createLink = linkService.createLink;