Ability to provide a callback function to metabind button
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, typescript
- Domain
- frontend
Research direction
No files or tests are named. Start by reading the metabind button API and the existing inlineJS and js action types; confirm how API-created buttons are dispatched. Done means an API caller can provide a JavaScript callback that runs when the button is activated while preserving access to the caller's context.
Written by the indexing model from the issue text.
Description
Please fill out these Check-boxes
- I checked for existing similar feature requests
- I have read the docs and checked that the feature I am requesting is not already implemented
- My feature request consists of only one feature
Is your Feature Request related to a Problem or Annoyance?
Metabind buttons are great when you use them from markdown but if I want to use them from API then the fact that I can't connect them to a simple javascript callback is very annoying. Sure I can use evaluate or give them source file path, but I am already in code, it'd be much simpler to just give it a callback.
Describe the Feature you'd like
Give me a simple way to invoke callback, e.g.:
{
type: ButtonActionType.JS_CALLBACK,
value: () => { console.log("Hello world!")
}
Alternatives
The following types are as close as we can get:
- inlineJS
- js
Which is not ideal, especially if you want to share some context between your code and the button callback
Additional Context
No response
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mProjectsCode/obsidian-meta-bind-plugin
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mProjectsCode/obsidian-meta-bind-plugin#669 · 2 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 62/100
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
feature request
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
bug can't reproduce
Difficulty 4/5 3-5 days Newbie friendliness 45/100
mProjectsCode/obsidian-meta-bind-plugin#667 · 9 comments ·
All issues in mProjectsCode/obsidian-meta-bind-plugin
Similar issues
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Crush Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ElementsProject/cln-application#167 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Quantco/pnpm-licenses#17 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100