Skip to content
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

Add default folder and prompt for name settings #204

Merged
merged 5 commits into from
Feb 1, 2024

Conversation

unxok
Copy link
Contributor

@unxok unxok commented Jan 28, 2024

My Issue

I wanted to be able to create notes at the click of a button and have them be from specific template into a specific folder and prompt for a name of the new note.

The workaround as is

There were a couple options to try and achieve this with the plugin as is:

  1. Put the folder name in the name of the file for the button.
  • This worked but I would have to go and still manually rename the file.
  1. Create a Templater script in a note, have the button 'append' it (disappears when triggered) and that script is what will actually do the prompting of a name and creating the file in a specific folder
  • This was annoying because I had to create a separate 'template command' file for each template to change the default folder location.

My Fork

With my fork I added two settings, one for setting a default folder to place the files in and another to choose to prompt for a name on clicking the button and it works! So I am happy with this fork of mine, but it would be cool if you were interesting in merging this to the main branch but idk.

Improvements?

I probably should have added in for the default folder setting to search the vault and suggest folders to be able to choose from. Also, pressing enter in the name prompt should submit without having to click the button (or tab enter works too).

But I whipped this up in a couple hours and I am tired and hungry, so maybe I will make that update tomorrow :)

@unxok
Copy link
Contributor Author

unxok commented Jan 28, 2024

Addresses #69

@shabegom shabegom merged commit 0efb381 into shabegom:main Feb 1, 2024
@unxok
Copy link
Contributor Author

unxok commented Feb 14, 2024

Oh wow thanks for the merge!

I still intend to go back and make the changes I mentioned before. I am on vacation this week so I am hoping to do that soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants