Hi everyone!
I'm Nishant Mittal (https://www.github.com/nishantwrp) from India and this summer I'll be working with Joplin on the template plugin!
Abstract
Joplin’s desktop app has a template feature i.e. users can make their templates and reuse the templates. For example - SWOT Analysis, Time Table, Meeting Notes, Journal, etc. and what not. But Joplin also has an awesome plugin architecture.
So it would be better if we repackage the template feature as a plugin due to many reasons like
- Better maintainability
- Features packaged as plugins would be more robust
- The feature would’ve better scope of improvement.
I basically propose to remove the existing feature and repackage it as a plugin while improving the template functionality.
Project goals
There are two main objectives of this project.
- Create a new plugin with improved template functionality
- Remove the template functionality from the main application
Plugin Design
The main improvements I plan to bring in the template functionality are as follows.
-
Removal of Refresh Templates - Currently there is a refresh templates option in the templates menu that reloads the templates from the template directory. Removing this option and loading the templates everytime user tried to select a template would improve the usability of the feature.
-
Default Templates - It is highly likely that most users have one or two templates that they use the most. And they want to create a new note using that template they’ll currently have to create a new note and then select a template that they want to insert. So, to make it more useful I’d like to introduce default templates feature. This feature was also once requested in the Joplin Forum, however my proposal of this feature is not exactly similar to the request of this user. The details of this feature can be found below in this section itself.
-
Pre Installed templates - When I tried to see the templates functionality in Evernote, I found that they provide some templates by default such as Meeting Note, Essay Outline, Meal Planner, Daily Reflection etc. I personally think that it would be great if we do it too in this plugin.
-
Save as template - Currently, if a user wants to create a new template they have to open the templates directory and create a new markdown file and maybe then use a third party editor to write the template. The point is that there is no convenient way to do so. So, I’d like to add a save as template option both in the menu and as a toolbar icon.
-
Toolbar icons - We can include two icons Insert Template and Save as template in the editor toolbar which I believe would be the best fit.
Basically, the plugin in the menu would look something like this.
Here, new note from template, new to-do from template, insert template would work in the same way as they currently do, the only difference being that there will be some pre-installed templates in the dropdown too.
The open templates directory will work in a similar way as it does now. It open a file manager with the templates directory.
The save as template option would save the current markdown content of the note after taking the name of the template as input from the user.
In the default template functionality the user will be able to set two default templates one for notes and one for to-dos. And as it can be seen in the picture there are two options: new note from default template and new to-do from default template. As the name suggests they would create a new note and to-do from their respective defaults. These options also have keyboard shortcuts which would make this feature a lot more usable.
Also, we can add two toolbar buttons that would look something like
The last two icons denote “Insert Template” and “Save as template”. In my opinion these two options would make the most sense in the editor toolbar.
Documentation
I’ll document the usage of the plugin in the README of the plugin repository. Also, I’ll try to use comments while coding wherever necessary to make the code easy to understand.
NOTE - This post will serve as a live specification for this project, I will be updating it regularly as I work on this project.