Templates are used to make your work easier by providing a structure so that you don’t have to start from scratch every time you write or generate a text.
Handlebars Template Engine is used. For more information, please visit their website.
The default folder for
textgenerator/prompts. You can change this path from the setting of the plugin.
In the prompts templates folder, each package has its folder, when updating a package, all the files inside might be overwritten. See Share a New Template Package.
Write a new Template
Create the template file
Using Create Template
- From your active document, run Create a Template.
- Create a file in Templates Folder.
- Add Template File Metadata.
Build the template
- Use Context available for templates to prepare the template. For more information about the template engine, please see handlebarsjs.
- The template will be accessible through Template commads.
- These are functions that help in dealing with the variables in a template. More details about these functions can be found in the following page : Helper Functions.