Template helps you use HackMD easier and faster, especially in these three ways:
Hint: If you want to use template for styling (using HTML
<style>
), embedding the template might be the better way.
You could find the tutorial and some example styling template below:
Click on the button next to the [New note] and click [ Create a note from template] in the drop down menu. You will then see the template panel. Choose which template to use and hit [Use this template].
Alternatively, you could create a new empty note and see the last three templates you used at the bottom of the editing area. Click to apply.
You could save block of contents as templates and re-use them when needed. Click the menu icon at the top-right corner and hit " Insert from template" to see the template panel. The chosen template will be inserted to your cursor position in the note when you click [Use this template].
Click " Save as template" in the menu at the top-right corner, and give your template a name.
You could "Create new template" from the button on the top right corner on the template panel.
Hint: The template created this way will receive its title from the template name, but changing the title doesn't change the template name. To change that, see manage template
You could manage (rename, edit, and delete) your templates in the template panel.
Hint: The preview of a template in the template panel would be its rendered view, so those invisible elements, such as YAML metadata、contents of HTML
<style>
or <!-- blocks commented out -->
will not show.
Since templates are just normal notes marked as templates, when you try to delete a template, HackMD will confirm the deletion of the underlying note. If you want to keep the note, don't forget to check the checkbox to keep the content.
Warning
On the other hand, if you want to delete a template but don't want to lose the content. You should check the option Turn this template into a regular note and keep its content
!
Editing template is pretty much the same as editing regular notes - all your edits will be automatically saved, except you will see a green banner telling you that you're editing a template.
▲ Green banner shows under template editing mode
If you unintentionally modify the template, you could always recover your content in [My Trash/Team Trash] .
Hint: New changes on a template won't get applied to notes previously created with that template. If that's what you want, try embedding the template.
Default template is a Prime feacture.
Templates saves time and efforts and you can set one of them as the default template so that every new note will apply the same template.
You can set default template for each workspace.
You cannot set a personal template as the default template for a team.
Visit My Workspace → Settings → Notes → Template
▲ Set default template for My Workspace
Visit Team Workspace → Team Settings → Notes → Template
▲ Set default template for a Team Workspace