Home    |    GitHub Page    |    API    |    FAQ

Joplin Templates

I’m currently working on adding new note templates to Joplin. Currently what I’ve implemented is the ability to add plain templates with some automatic insertion (currently just date and time). I realize that this feature is probably looked at quite differently by each user of Joplin and I was hoping that could get some people on the forum to outline how they would use this feature so I can ensure that as many workflows as possible are supported.

image

For example, I would use this feature to track my hours on a specific project with a template like this

Date: {{date}}
Hours:
Details:

where {{date}} would be replaced with today’s date.
I would be able to select this template while creating a new note and that note would have the contents.

Date: 2019-06-15
Hours:
Details:

How would you like to use this feature?

1 Like

I would expect each user will have different needs in terms of date format, so maybe it would mean supporting some kind of function. For example, {{date("d/mY")}} although it’s not standard Mustache.

Currently the format used is the same as the one from settings. using mustache syntax it should be possible to allow custom date strings thought, I’ll take a look.

1 Like

This is an awesome feature, thank you for adding this in!! Quick question… I haven’t used mustache formatting before, is there a way to format date and time in the template? For example:

Year-Month-Date Hour:Min
2019-09-01 18:38

Or,
Year-Month-Date Hour:Min (AM/PM)
2019-09-01 6:38 PM

1 Like

Yes that’s possible, please check the Joplin website and specifically the part about custom_datetime. Also @dpoulton kindly gathered a list of supported formats

1 Like

Oh wow I am super blind - I thought I read all of the documentation and FAQ pages before commenting. Thank you!!! :slight_smile:

Does this work in the terminal application? If not can/will it at some point? I’d be interested in helping implement it if it’s not too advanced of a task.

Would this have to be limited to date and time and similar entries, or could it include bulleted lists, pre-formated tables, font sizes and all the rest ?

The templates are markdown, so you should be able to put all sorts of things in there. I have only testes with using headers, list items, and bullets, but I imagine any valid Joplin markdown works.

In case you, or anyone else is wondering, you make templates by going to File > Templates > Open Templates directory. In that directory, create a markdown file (ends in .md ). Then, click Refresh Templates to have it appear in the list of available templates.

1 Like

That does help, markdown is probably easy enough, but since I never use it (not in Joplin nor elsewhere) it didn't occur to me that I could use anything in that folder and Joplin would interpret as a template. Big .... "heart" for that.

1 Like