Closed DavidRV00 closed 1 year ago
Default timestamp makes the most sense. Need to pre-highlight this so one can easily replace the default.
Also note that starting typing immediately is what quicknote is for :)
Quicknote is awesome! But just for my usual usecase, it doesn't quite work because it doesn't spawn a new file each time; can't go back and look at it later if I've written a new quicknote.
Here is a fun hack for you
Markor will execute any JS code in a script tags when you switch to view mode
I use the following code to open a file with today's date in the current folder. If the file does not exist it will be created.
You can modify this to open a new file in the current folder with any programmatically generated name. If you want a new unique name you could use seconds or a UUID
<script>
let anchor = document.createElement('a');
// This asinine approach is from https://stackoverflow.com/a/28149561
// offset in milliseconds
let offset = (new Date()).getTimezoneOffset() * 60000;
let iso = (new Date(Date.now() - offset)).toISOString()
let today = iso.split('T')[0]
let textNode = document.createTextNode("Today's worklog");
// Append the textNode as a child to anchor.
anchor.appendChild(textNode);
anchor.href = "./" + today + ".md";
anchor.style.fontSize = "x-large";
document.body.appendChild(anchor);
window.location.href = anchor.href
</script>
Make a shortcut to this html file and it will open in view mode -> create a new file with a unique name and open it for editing. All in one click.
You can use this to emulate Obsidian's daily note as I am doing in this example
Awesome, I'll try this out this week, thanks.
To clarify, you're saying that I should add this html file (or a shortcut to it) in my markor notes directory, and open it from within markor, and that will execute the code and open a newly-created note?
Pretty much
It works, thanks!
Do you think it would be worthwhile to have this as a built-in feature of the app, though? I could potentially volunteer to work on a pull request for it if so.
In some sense it is a built in feature of markor :)
Imo the most useful thing would be to create a guide to using js in markor. This is the only trick I know, there are likely others.
I think there is a viable option suggested. Markor gives you freedom to do what you want on many places (of course if you know how to). This one is specifically: If you reference a local file and trigger opening it with Markor - it is automatically created if it does not exist. Thus it works to generate some (whatever timestamp based format or other logic) filename and ask to open it.
Humbly said, I want to keep it possible for users to do such things (don't want to put restrictions here), and also for the other part of users - I don't want to bloat everything.
I think Markor got a lot of stuff over years and sometimes feels a bit bloated on some things, at last more than I want it to be. My goal always has been to make the most functionality out of the least amount of features.
⚠️ This issue respects the following points: ⚠️
Description
Hello, I'm loving Markor so far, but what I'd really like to do is just click "+" and start writing, without having the friction of specify a filename. When I have an idea I want to remember, it's important for me to just be able to get it down as quick as I can.
There are a couple ways this could be done:
I've seen a couple similar-sounding issues relating to templates, but nothing relevant that's still open.
Information
Android version: 12 Device: OnePlus Nord N200 5G App Version: 2.10.9
Source
F-Droid
Format / File type
Not specific
Additional info / Log