-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended button features #194
Comments
btw you can call button actions from JS with meta binds API. |
Ah thats perfect. Exactly what I needed. Between this and JSEngine I'm sorted. Thanks :-) |
first use case of being able to append text within a document is currently broken in the obsidian buttons plugin. if this gets added i'll definitely move over. so that's one vote from me :) |
@XandaPanda42 would you be able to post your solution here as an example for us who are also looking to do something similar? |
I am closing this in favor of #206 |
Is your Feature Request Related to a Problem?
No response
Describe the Feature you'd Like
Hey,
Love the Plugin, it's helped heaps. I thought I'd put in a feature request for some things I think might be cool, or could be useful.
Relative Text Entry
I think it'd be useful for a button to be able to insert text into the current document, but especially using a position relative to itself. For example, it inserts a string (any) 5 characters before the button prompt itself, followed by a newline.
Use Case
This would allow the user to add a new line to a markdown table for example, or allow greater control over templater code. You could have a button that inserts a template, followed by a few newlines, followed by a second command to apply it. You can already chain commands together.
The current functionality is either apply a template to a new note, or add a string to the cursor position, but buttons aren't shown in edit mode, and the cursor isn't shown in reading mode, which limits you to using a different note in the sidebar to add text this way.
Destructible buttons OR a way to bind the "Hidden:" state to a Note's frontmatter field or property.
A feature to allow a button to switch itself off, or even delete itself on command.
EDIT: Sorry, I just had a look through previous FR's again and saw this had been mentioned already as WONTFIX. All good.
Use Case
On my landing page, I've got two buttons, One switches Obsidian into Dark Mode. The other switches it into Light Mode. When I'm in dark mode, the dark mode button is useless and just taking up space and the same with light mode.
But if the button was able to hide itself after being clicked, only one button would be visible at a time. Like a toggle, but with the command input functionality of a button, and the possibility for more than two options.
Variables or custom fields for buttons?
If there was a way to have a button copy a bit of the frontmatter and send it along with a template.
On a daily note page for example. I need to write down that I've an important call coming in a few days. I make a dataview field with a button below it. I use the button to create a new Note using a template I've provided, but there's no (non "hacky") way to send the date field of the current page along with it.
Use Case
If I enter the note page for my daily note for 7 days from now, I can click a button and it will automatically create and template a note for a deadline using the "Date:" field of the page it came from.
This could also be used within the same page. If I'm writing notes on an appointment I'm currently in, and learn there's a new one coming up in two weeks time, I can click a button, and It'll automatically fill out the business name for me.
If you want any clarification on what I mean for any of these or any other use cases, let me know. I think they could add some really useful functionality, especially to people who aren't really familiar with JS yet, myself included.
Thanks for reading :-) Wish I knew enough Javascript to contribute in other ways.
Additional Context
No response
The text was updated successfully, but these errors were encountered: