Template Plugin

A special tag reserved for templates?

1 Like

I did think of this. But the main problem is comprising b/w people who like the notebook idea and ones who don't prefer templates in their notebooks or as a note at all.

PS: Created a topic for this Opinion on the templates should be organized - #2 by nishantwrp

I suppose only the last option is problematic, the first 2 can easily be handled with a tag.


Maybe you should create a poll? It's easier for users to just click a button rather than type a whole message so hopefully you'll get more responses this way.

How do I do that within discourse or should i post an link to external poll?

1 Like

Thanks, created a poll. Opinion on the templates should be organized - #3 by nishantwrp

Please take a look at Deprecating pre-installed template feature

Important Links

1 Like

Updated Plan

Week 1

  • Initialize Plugin Framework
  • Setup Github Actions
    • Lint Checks
    • Build Checks
    • TypeScript Check (If not covered by above checks)
    • Unit Tests if needed further
  • Implement Notebook System
  • Created a command to expose joplin prompt to plugins

Week 2

  • Create the basic newNote, newTodo, insertText options.

Week 3

  • Work on default templates functionality.

Week 4

  • Complete default templates functionality.
  • Introduce handlebars and make sure all the current templates are compitable with the plugin.

Week 5

  • Create UI for variable input component.

Week 6

  • Write parsers for variable syntax.

Week 7

  • Complete variable feature.

Week 8, 9, 10

  • Finalize the way to handle the transition of users to this plugin.
  • Update documentation.
  • Finalize and implement the way to store the templates. (Tags, notebook, etc.)
  • Removal of original feature from the main codebase.
  • Release the final version of the plugin.
1 Like

Thanks for the updated plan, but note that removing the feature from the codebase may take a bit more time than you think as there will be a review process.

It's also key to your project because if the feature is still there by the time you finish, there's no need for the plugin at all. So what I would suggest is to create a pull request to remove the feature as soon as you can. That will get things started, then the reviewing process can happen in parallel to your other tasks.

1 Like

Yup sure, I'll try to create the PR next week. Just to be clear, The PR will be merged only after the plugin is complete, right?

Once it's ready it will be merged, but it will be in a separate branch so that we can test without having to make it part of an official release (or pre-release).

1 Like

All good here, thanks for a such a convenient and well implemented plug-in.

Do custom variable definitions need particular fencing? I directly copied your example, and it doesn't work as expected.

Test template

Date: {{date}}

Time: {{time}}

Datetime: {{datetime}}

Custom Datetime: {{#custom_datetime}}MMMM YYYY, h:mm:ss a{{/custom_datetime}}

Date of beginning of week: {{bowm}}

# Create custom variable example

name: text
color: enum(Red, Yellow, Green)


Hi there, {{ name }}. Your favorite color is {{ color }}. This note/to-do was created on {{ datetime }}.


Date: 2021-08-07

Time: 7:41 PM

Datetime: 2021-08-07 7:41 PM

Custom Datetime: August 2021, 7:41:54 pm

Date of beginning of week: 2021-08-02

# Create custom variable example

name: text
color: enum(Red, Yellow, Green)


Hi there, . Your favorite color is . This note/to-do was created on 2021-08-07 7:41 PM.

I'm using joplin Joplin 2.1.9 (prod, win32)
I'm told when I try to upgrade that I have the latest version.
When I try and install your template I get this notice:
upgrade notice

Not sure what to do now.

From the release post

  • Update to the latest pre-release of the desktop application i.e. 2.2.5 .


You have text bevor the fence block, witch starts and ends with ---.
In the exaple is the folowing code:

name: text
color: enum(Red, Yellow, Green)


Hi there, {{ name }}. Your favorite color is {{ color }}. This note/to-do was created on {{ datetime }}.

1 Like

Thanks Jack. I just glanced at it assured that I knew how to install a plugin.

Thanks, @JackGruber, all works fine now. I didn't understand the custom variables must be declared right at the start of the note and --- is the fence mark used.

Thanks for this plugin, installed it today and it works great!

1 Like
  • Is it possible to set the name/title of the note from the template? I want the name of the template to be the current date for instance.

  • Any way to create a note directly from a template without creating an empty note then applying a template?

  • Any way to modify how the date is represented? Currently, it is mm/dd/yyyy unlike it is shown in the doc 2019-01-01

  • Is it possible to position the caret after the template applied?

  • It would be nice to put the templated note under certain folder automatically.

1 Like