Imed Ghomari241 downloadsAdds configurable Templater-powered buttons to Obsidian Bases.
This is a plugin for Obsidian that lets you define button properties, such as button.run, which render as clickable buttons in core Bases tables.
Each button runs a configured Templater template against the note represented by the property or Base row.
run; the plugin will use button.run.Templates/Archive task.md.button.run as a property column in a Base.The plugin does not render buttons in note frontmatter. It only renders buttons inside Bases tables.
When clicked, tapped, or activated with Enter from a selected button cell, the button runs the configured Templater file against the note for that Base row. In templates, prefer tp.config.target_file when you need the note that was clicked from a Base. The active file may be the Base itself or another open note.
Example Templater snippet:
<%*
await app.fileManager.processFrontMatter(tp.config.target_file, (frontmatter) => {
frontmatter.done = true;
frontmatter.completed = tp.date.now("YYYY-MM-DD");
});
%>
Since this plugin is not yet in the community directory, you can install it manually:
<vault>/.obsidian/plugins/bases-buttons/.main.js, manifest.json, and styles.css.If you want to build the plugin from source:
npm install to install dependencies.npm run dev to start compilation in watch mode, or npm run build for a production build.This plugin manipulates the DOM of Bases views, so it may require updates if the Obsidian core UI changes significantly in future versions.
This plugin is based on the original Custom Selectors plugin by hodie.
This project is provided under the MIT License.