### Example: Dataview List Files Query Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/cli/cli.md An example showing how to add a Dataview item to list files in a specific folder. ```sh # List files in a folder note-toolbar:add-dv to=Basic label=QueryExample query="LIST FROM \"Templates\" SORT file.name" ``` -------------------------------- ### Example: Add Bold Toggle Command Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/cli/cli.md An example demonstrating how to add a bold toggle command to an existing toolbar. ```sh # Add a bold toggle to an existing toolbar note-toolbar:add-command to="Formatting Tools" icon=bold command="editor:toggle-bold" ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/CONTRIBUTING.md Clone the repository and install the necessary Node.js dependencies to begin development. ```bash git clone https://github.com/chrisgurney/obsidian-note-toolbar.git cd obsidian-note-toolbar npm install ``` -------------------------------- ### Generate Toolbar Callout with Bookmarks Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Bookmarks Use this example within a callout to dynamically generate a toolbar of your starred bookmarks using Dataview. Ensure the Dataview plugin is installed. ```markdown > [!note-toolbar] > ```dataview > LIST > WHERE file.starred > SORT file.name > ``` ``` -------------------------------- ### Install Obsidian Skills Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/skills/README.md Use these commands to install skills from GitHub repositories. Ensure you specify the correct repository path. ```bash Install the skills from github.com/kepano/obsidian-skills ``` ```bash Install the skills from github.com/chrisgurney/obsidian-note-toolbar/skills ``` -------------------------------- ### Example: Dataview Evaluate File Mtime Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/cli/cli.md An example demonstrating how to add a Dataview item to evaluate the modification time of the current file. ```sh # Get the file modified time note-toolbar:add-dv to=Basic label=EvalExample eval="this.file.mtime" ``` -------------------------------- ### Run Development Server Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/CONTRIBUTING.md Start the development server to watch for file changes during development. ```bash npm run dev ``` -------------------------------- ### Link to Tips Documentation Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/CONTRIBUTING.md Example of creating a Markdown link to a specific help tip within the plugin using a custom URI scheme. ```markdown Learn about how to add toolbars to your [daily notes](obsidian://note-toolbar?tip=daily-notes). ``` -------------------------------- ### Translate Style Settings Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/CONTRIBUTING.md Example of translating UI strings for the Style Settings plugin, including titles and descriptions, for different languages. ```yaml title: 'Floating Button' title.uk: 'Плаваюча кнопка' description: 'Styles for floating buttons (set toolbar position to "floating button")' description.uk: 'Стилі для плаваючих кнопок (встановіть позицію панелі інструментів на «плаваючу кнопку»)' ``` -------------------------------- ### Property Variable with Protocol Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Variables Shows how to prepend a protocol like 'https://' to a property variable `{{prop_url}}` to create a functional web link. ```text https://{{prop_url}} ``` -------------------------------- ### Property Variable Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Variables Demonstrates using a property variable `{{prop_url}}` which resolves to 'google.com'. Clicking this would create a note named 'google.com'. ```text {{prop_url}} ``` -------------------------------- ### Search Selection URI Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Variables Construct a search URI that dynamically incorporates the user's current selection or cursor word. ```uri obsidian://search?query={{encode:selection}} ``` -------------------------------- ### Copy Output to Clipboard Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/wiki/Note-Toolbar-CLI.md Append the --copy flag to any command to copy its output directly to your system clipboard. This example shows how to get a CSV list of items. ```sh obsidian note-toolbar:items empty format=csv --copy ``` -------------------------------- ### Execute Templater File Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Templater Execute a Templater script file. Ensure 'tp' is included in the function signature to access Templater's API. ```javascript /** * Adds a date stamp to the filename of the current file. */ module.exports = async function FileRename(tp) { tp.file.rename(tp.file.title + ' ' + tp.date.now()); } ``` -------------------------------- ### Execute Templater Command Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Templater Execute a Templater command and retrieve its result. The '<%' and '%>' tags are optional. Use 'tp.user...' to execute user scripts. ```javascript tp.file.creation_date() ``` -------------------------------- ### Note Toolbar with Iconize Plugin Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-Callouts Integrate icons into note toolbar items using the Iconize plugin. The example shows how to use Iconize syntax within a link. ```markdown >[!note-toolbar] > - [:LiPin: Pin note]() ``` -------------------------------- ### Example Note Toolbar URIs in Callouts Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-URIs Demonstrates how to use various Note Toolbar URIs within a note-toolbar callout. Ensure URIs are wrapped in angle brackets when used within Obsidian. ```markdown > [!note-toolbar] > - [Command URI]() > - [Folder URI](obsidian://note-toolbar?folder=Demos) > -
> - [Menu URI](obsidian://note-toolbar?menu=Tools) > - [Menu URI with ID](obsidian://note-toolbar?menu=7fb30215-d92c-43ce-8158-b79096672bd1) ``` -------------------------------- ### Templater Expression Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Variables Integrate Templater expressions for dynamic values, similar to Dataview, using Templater's syntax. ```text {{tp: tp.date.now("MMM Do")}} ``` -------------------------------- ### Add a Command Item to a Toolbar Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/skills/note-toolbar-cli/SKILL.md Add a new command item to a specified toolbar. This example adds a 'Bold' command to the 'Formatting' toolbar. ```bash obsidian note-toolbar:add-command to=Formatting label=Bold command=editor:toggle-bold focus ``` -------------------------------- ### Note Toolbar Management Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Examples Commands for managing the Note Toolbar, including opening the toolbar suggester, quick tools, and settings, as well as accessing the user guide. These are essential for customizing and navigating the plugin's features. ```markdown > [!note-toolbar] Note Toolbar > - [:LiPackageSearch:]() > - [:LiRocket:]() > - [:LiSettings2:]() > - [:LiBook:](https://github.com/chrisgurney/obsidian-note-toolbar/wiki) ``` -------------------------------- ### Execute Obsidian Commands Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Navigation Create Command items to execute Obsidian's built-in commands. Examples include closing tabs, creating notes, and navigating between tabs. ```markdown Close current tab ``` ```markdown Create new note ``` ```markdown Go to next tab ``` ```markdown Go to previous tab ``` ```markdown New tab ``` -------------------------------- ### Note Toolbar Callout for Executing JavaScript Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/JS-Engine Example of a Note Toolbar callout configuration using `data-js-engine="exec"` to execute a JavaScript file. Ensure the JS Engine plugin and Note Toolbar's Scripting option are enabled. ```markdown > [!note-toolbar] JS Engine Toolbar > - [Hello World with JS Engine]() ``` -------------------------------- ### Note Toolbar Callout for Create New Note Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Templater Example of a Markdown callout using Note Toolbar's data attributes to create a new note from a template with a dynamically generated filename. ```markdown > [!note-toolbar] Templater Toolbar > - [Create from Template]() ``` -------------------------------- ### Open in VS Code URI Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Variables This URI uses encoded variables for vault path and file path to open the current file in VS Code. ```uri vscode://file/{{encode:vault_path}}%2F{{encode:file_path}} ``` -------------------------------- ### Dataview Query Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Dataview Executes a Dataview query to list files and their last modified times from a specific folder. This is useful for displaying dynamic lists of content within a toolbar item. ```sql TABLE file.mtime AS "Last Modified" FROM "SomeFolder" SORT file.mtime DESC ``` -------------------------------- ### Configure Obsidian Note Toolbar Suggester Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/releases/en/1.29.md Example of how to use ntb.suggester with custom options like placeholder text, an icon, and collapsed input. This function returns the selected value or null. Requires Obsidian Note Toolbar v1.29.14+. ```javascript const values = ["value 1", "value 2"]; const selectedKey = await ntb.suggester(values, null, { placeholder: "Find something...", icon: "search", collapse: true }); new Notice(selectedKey); ``` -------------------------------- ### Configure ntb.suggester() with Prefixes Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/releases/en/1.30.md Use the `prefixes` option to define custom triggers for suggester results. This example shows how '#' triggers tag suggestions, '[[' triggers file suggestions, and ';' triggers an asynchronous suggester. The `values` parameter is optional when `allowCustomInput` is true. ```javascript const values = ['cat', 'dog']; // or pass in `null` if you don't want any values const selected = await ntb.suggester(values, null, { allowCustomInput: true, // not required if values is `null` prefixes: { '#': () => Object.keys(this.ntb.app.metadataCache.getTags()), '[[': () => this.ntb.app.vault.getAllLoadedFiles().map(f => `[[${f.extension === 'md' ? f.basename : f.name}]]`), ';': async () => await ntb.suggester(['cow', 'chicken']) } }); new Notice(selected); return selected; ``` -------------------------------- ### Get Active Markdown View Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/INoteToolbarApi.Interface.default.md Uses the Obsidian API module reference (`ntb.o`) to get the currently active Markdown view within the Obsidian workspace. ```typescript // get the current markdown view const view = ntb.app.workspace.getActiveViewOfType(ntb.o.MarkdownView); ``` -------------------------------- ### getActiveItem Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/INoteToolbarApi.Interface.default.md Gets the most recently activated toolbar item. ```APIDOC ## getActiveItem ### Description Gets the active (last activated) toolbar item. ### Signature `getActiveItem() => IItem | undefined` ### Returns `IItem | undefined` The active (last activated) item. ### Remarks This does not work with Note Toolbar Callouts. ``` -------------------------------- ### Create a New Toolbar Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/wiki/Note-Toolbar-CLI.md Create a new Note Toolbar by providing a name for it. ```sh obsidian note-toolbar:new name=Formatting ``` -------------------------------- ### id? Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/IItem.Interface.IItem.md Gets the unique identifier for the toolbar item. ```APIDOC ## id? ### Description Gets the unique identifier for the toolbar item. ### Type `string` (optional) ### Example ```ts const item = ntb.getActiveItem(); const itemId = item.id?; ``` ``` -------------------------------- ### getProperty Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/INoteToolbarApi.Interface.default.md Gets the value of a specified property from the active note's frontmatter. ```APIDOC ## getProperty ### Description Gets the value of the given property in the active note. ### Signature `getProperty(property: string) => string | undefined` ### Parameters #### Parameters - **property** (string) - Required - The property to get the frontmatter for. ### Returns `string | undefined` The frontmatter value for the given property, or `undefined` if it does not exist. ### Example ```ts const createdDate = ntb.getProperty('created'); ``` ``` -------------------------------- ### getItem Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-API Gets an item by its ID, if it exists. The ID can be copied from the item's settings. ```APIDOC ## getItem ### Description Gets an item by its ID, if it exists. ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the item. ### Returns - `IItem` | `undefined` - The item, or undefined. ### Example ```js // to get the ID, edit an item's settings and use _Copy developer ID_ const item = ntb.getItem('112c7ed3-d5c2-4750-b95d-75bc84e23513'); ``` ``` -------------------------------- ### Open Specific Toolbar via Command Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Commands Enable the 'Add toolbar command' setting in a toolbar's settings to create a command for opening that specific toolbar in a Quick Tools window. Assign a hotkey for convenient access. ```text Note Toolbar: Open: YOURTOOLBARNAME ``` -------------------------------- ### Note Manipulation API Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/wiki/Note-Toolbar-API.md Provides functions to get and set properties and selections of Obsidian notes. ```APIDOC ## Note Manipulation API ### Description Functions for interacting with note properties and selections. ### Methods - **`ntb.getProperty(key: string)`**: Gets a property of the current note. - **`ntb.setProperty(key: string, value: any)`**: Sets a property of the current note. - **`ntb.getSelection()`**: Gets the current text selection in the note. - **`ntb.setSelection(start: number, end: number)`**: Sets the text selection in the note. ``` -------------------------------- ### List Note Toolbar CLI Actions Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/cli/cli.md Lists all available actions for the Note Toolbar CLI. ```sh note-toolbar:help ``` -------------------------------- ### Create Menu from Scratch Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-API Creates a custom menu with specified items, including commands, file links, and URIs. Each item can have a label and an icon. ```typescript // create a menu from scratch await ntb.menu([ { type: 'command', value: 'editor:toggle-bold', label: 'Toggle Bold', icon: 'bold' }, { type: 'file', value: 'Home.md', label: 'Open File' }, { type: 'uri', value: 'https://example.com', label: 'Visit Site' } ]); ``` -------------------------------- ### JavaScript Expression Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Variables Utilize JavaScript expressions for dynamic content generation, such as formatting the current date. ```javascript {{js: return new Date().toLocaleDateString('en-US', { month: 'short', day: 'numeric' })}} ``` -------------------------------- ### note-toolbar:use Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/cli/cli.md Executes an item, defaulting to the active file. You can specify a different file or path for the item to be used in. ```APIDOC ## `note-toolbar:use` Makes use of an item. Defaults to using the item within the active file. ### Parameters #### Query Parameters - **item** (string) - Required - ID of item to use. - **file** (string) - Optional - File to use the item in. - **path** (string) - Optional - Path of file to use the item in. ``` -------------------------------- ### getProperty Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-API Gets the value of a specified property from the active note's frontmatter. Returns undefined if the property does not exist. ```APIDOC ## getProperty ### Description Gets the value of the given property in the active note. ### Method `getProperty(property: string) => string | undefined` ### Parameters #### Path Parameters - **property** (string) - Required - The property to get the frontmatter for. ### Returns `string | undefined` - The frontmatter value for the given property, or `undefined` if it does not exist. ### Example ```ts const createdDate = ntb.getProperty('created'); ``` ``` -------------------------------- ### Create New Toolbar Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-CLI Creates a new toolbar with a specified name. ```sh name= # Toolbar name ``` -------------------------------- ### Embed Video using Video Callout Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/CONTRIBUTING.md Embed a video in the tips section using the `note-toolbar-video` callout. Provide the direct URL to the video file. ```markdown > [!note-toolbar-video] > https://chrisgurney.github.io/obsidian-note-toolbar/tips/en/getting-started-gallery.mp4 ``` -------------------------------- ### Dataview Expression Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Variables Use Dataview expressions within variables to dynamically insert values like formatted dates. ```text {{dv: dateformat(date(today), "MMM d")}} ``` -------------------------------- ### note-toolbar:add-tp:exec Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/cli/cli.md Adds an item to a toolbar that executes a Templater file. ```APIDOC ## `note-toolbar:add-tp:exec` ### Description Adds an item to a toolbar that executes a Templater file. ### Method CLI Command ### Endpoint note-toolbar:add-tp:exec ### Parameters #### Query Parameters - **to** (string) - Required - Toolbar name or ID to add item to. - **label** (string) - Required - Item label (required: label or icon). - **icon** (string) - Required - Item icon, from Lucide's icon set (required: label or icon). - **file** (string) - Required - Template filename to execute (required: file, or path). - **path** (string) - Required - Template filename with path to execute (required: file, or path). - **tooltip** (string) - Optional - Item tooltip. - **pos** (number) - Optional - Item position in toolbar (default: end of toolbar). ``` -------------------------------- ### Get Note Property Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/INoteToolbarApi.Interface.default.md Retrieves the value of a specified property from the active note's frontmatter. Returns undefined if the property does not exist. ```typescript const createdDate = ntb.getProperty('created'); ``` -------------------------------- ### Basic Suggester with Values Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/INoteToolbarApi.Interface.default.md Displays a suggester prompt with predefined string values. The selected value is returned. ```typescript // shows a suggester that returns the selected value const values = ["value `1`", "value `2`"]; const selectedValue = await ntb.suggester(values); new Notice(selectedValue); ``` -------------------------------- ### Add Toolbar Items using Gallery Callout Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/CONTRIBUTING.md Use the `note-toolbar-gallery` callout to create a strip of item cards. List the Gallery item IDs within the callout. ```markdown > [!note-toolbar-gallery] > - copy > - paste > - undo > - redo ``` -------------------------------- ### List Items in All Toolbars Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-CLI Lists items in all toolbars, with options to filter, include empty items, specify output format, and include verbose details or counts. ```sh toolbar= # Toolbar to list items for filter= # Filter by string in label/tooltip empty # Include empty items in output format=csv|tsv # Output format (default: tsv) total # Returns count verbose # Include additional details in output ``` -------------------------------- ### Open Plugin Settings Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Commands Opens the main configuration settings for the Obsidian Note Toolbar plugin. ```obsidian Note Toolbar: Plugin settings ``` -------------------------------- ### Get Current File and Show Notice Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/INoteToolbarApi.Interface.default.md Accesses the Obsidian application instance to retrieve the currently active file and display its name using a notice. ```typescript const currentFile = ntb.app.workspace.getActiveFile(); new Notice(currentFile.name); ``` -------------------------------- ### note-toolbar:new Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/cli/cli.md Creates a new, empty toolbar with a specified name. ```APIDOC ## `note-toolbar:new` Creates a new toolbar. ### Parameters #### Query Parameters - **name** (string) - Required - Toolbar name. ``` -------------------------------- ### Get Current Selection Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/releases/en/1.26.md Retrieves the currently selected text, the word at the cursor's position, or returns an empty string if no text is selected or at the cursor. ```APIDOC ## Get Current Selection ### Description Returns the text that is currently selected, the word at the cursor's position, or an empty string otherwise. ### Endpoint `ntb.getSelection()` ### Usage Example ```ts const selectedText = ntb.getSelection(); console.log(selectedText); ``` ``` -------------------------------- ### Get Item by ID Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-API Retrieves a specific toolbar item using its unique developer ID. Ensure you have the correct ID, which can be copied from the item's settings. ```javascript const item = ntb.getItem('112c7ed3-d5c2-4750-b95d-75bc84e23513'); ``` -------------------------------- ### Create Custom Menu from Scratch Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/INoteToolbarApi.Interface.default.md Creates a custom menu with specified commands, files, or URIs. Useful for building dynamic navigation or action menus. ```typescript await ntb.menu([ { type: 'command', value: 'editor:toggle-bold', label: 'Toggle Bold', icon: 'bold' }, { type: 'file', value: 'Home.md', label: 'Open File' }, { type: 'uri', value: 'https://example.com', label: 'Visit Site' } ]); ``` -------------------------------- ### Get Note Property 'created' Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/JavaScript Access and display the 'created' property of the current note using this JavaScript expression. This requires the Note Toolbar API to be available. ```javascript {{js: return ntb.getProperty('created') }} ``` -------------------------------- ### Execute Note Toolbar Command via Obsidian CLI Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Commands Use the Obsidian CLI to list available Note Toolbar commands or execute a specific command by its ID. Requires Obsidian v1.12 or later. ```bash obsidian commands filter=note-toolbar ``` ```bash obsidian command id=note-toolbar:open-gallery ``` -------------------------------- ### Suggester with Exact Matching Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-API Setting `exact` to `true` changes the matching behavior from fuzzy to exact substring matching, prioritizing results that start with the input string. ```typescript const result = await ntb.suggester(lorem, ipsum, { exact: true }); ``` -------------------------------- ### Use an Item Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-CLI Uses an item, defaulting to the active file. Allows specifying the item ID and optionally the file or path to use it in. ```sh item= # ID of item to use (required) file= # File to use the item in path= # Path of file to use the item in ``` -------------------------------- ### List All Toolbars Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/wiki/Note-Toolbar-CLI.md Use this command to see a list of all available Note Toolbar toolbars in your Obsidian vault. ```sh obsidian note-toolbar ``` -------------------------------- ### JS Engine Expression Example Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Variables Employ JS Engine expressions to access and manipulate Obsidian's internal objects, like the active file's basename. ```javascript {{jse: return app.workspace.activeEditor.file.basename}} ``` -------------------------------- ### Basic Dataview JavaScript Execution Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Dataview Executes a simple Dataview JavaScript snippet that logs a message to the console and displays a notice. This is a basic example for running custom scripts. ```javascript dv.paragraph("👋 Hello note!"); // must use Output callout ID for this to appear console.log("👋 Hello console!"); new Notice("👋 Hello notice!"); ``` -------------------------------- ### Execute Command URI Format Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Note-Toolbar-URIs The standard format for creating a URI to execute a specific command within the Note Toolbar plugin. Use the 'Copy URI for command' feature to obtain command IDs. ```url obsidian://note-toolbar?command=COMMANDID ``` -------------------------------- ### Link to Parent Note Source: https://github.com/chrisgurney/obsidian-note-toolbar/wiki/Navigation Use a link variable with a note property to link to a parent note. For example, if a property is named 'Up', use `{{prop_up}}` in a URI link. ```markdown {{prop_up}} ``` -------------------------------- ### Get Toolbar Item by ID Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/api/INoteToolbarApi.Interface.default.md Retrieves a specific toolbar item using its unique developer ID. This is useful for direct manipulation or inspection of individual toolbar elements. ```javascript // to get the ID, edit an item's settings and use _Copy developer ID_ const item = ntb.getItem('112c7ed3-d5c2-4750-b95d-75bc84e23513'); ``` -------------------------------- ### Open Note Toolbar Settings Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/dist/cli/cli.md Opens the settings UI in Obsidian for a specific item or toolbar. Defaults to the main settings UI if no item or toolbar is specified. ```sh note-toolbar:settings item= # ID of item to open settings for toolbar= # Name or ID of toolbar to open settings for ``` -------------------------------- ### Get Current Text Selection Source: https://github.com/chrisgurney/obsidian-note-toolbar/blob/master/docs/releases/en/1.26.md The `ntb.getSelection()` function retrieves the currently selected text, the word at the cursor's position, or an empty string if no text is selected or at the cursor. ```javascript ntb.getSelection() ```