# Documentation - [x] Read the [official documentation](https://quickadd.obsidian.guide/docs/) 📅 2023-05-03 ✅ 2023-05-03 - In QuickAdd, you add "choices" which can either be: - Templates - templates integrated with the [[Templater Obsidian Plugin]] - Capture - manually written information in a form that can be formatted in an existing file - Macro - macros that are generally javascript functions that do anything you want, including fetching data from web sources and potentially updating the files. - Multi - folders to organize the previous 3 choices ## Captures - Capture input and save it into a file from anywhere in Obsidian - File can be specified as: - file path - a tag (choice of all files with a certain tag - Capture format is a mini template - [Format Syntax](https://quickadd.obsidian.guide/docs/FormatSyntax) ## Templates - supplement to the [[Templater Obsidian Plugin]] - Specify the template path and then the file name format and folder in which we will create it. - We can use this to generate the home page for the [[Obsidian Publishing Solution Selection]] ## Multis - Just a folder sorting mechanism for the various choices\ ## Macros - You can set macros to run on plugin load - super useful for the homepage publishing idea - in the macro manager - Macros are defined by a JavaScript file anywhere in your vault. - must export a function that is the macro: - async function that takes a `params` object and has access to: - `params.QuickAddApi` has functions for quickadd - `app` is the obsidian app instance - `app.plugins.plugins` can access [[MetaEdit Obsidian Plugin]] and [[Obsidian Dataview Plugin]]. - `variables` which is an object that if you assign objects can be used in subsequent macros either via `{{VALUE:<variable name>}}` and `params.variables[['<variable_name>']]` - `window.moment` is the moment object - You can export more than functions, then the plugin will prompt you to select from a choice of those macros. You can access directly via `{{MACRO:MacroName:ExportName}}` ## Format Syntax - `{{DATE}}` - is the date - `{{DATE:<DATEFORMAT>}}` - formatted using moment.js - `{{VDATE:<name>,<dateformat>}}` - requires [[Natural Language Dates Obsidian Plugin]], and allows input to be natural language then stored as a date - `{{VALUE}}` or `{{NAME}}` - value given in an input prompt, or selected text in the current editor - `{{VALUE:<variable name>}}` saved from others - `{{LINKCURRENT}}` - wikilink to the file from which template was activated. - `{{MACRO:<macro name>}}` - execute a macro and return value here - `{{TEMPLATE:<template path>}}` - Include templates in the format. Supports templater syntax - `{{MVALUE}}` - Math modal for LaTeX that includes a preview - `{{FIELD:<field name>}}` - this is a YAML field and prompts an autosuggest - `{{selected}}` - selected text in the current editor ## Inline scripts - Supported in [[#Templates]] and [[#Captures]]. - Can execute any JavaScript code you want. - it's a `js quickadd` code block that returns a String at the end so that it can be replaced.