To allow others to generate new documents based on your template or a string variable, use the Notepad: New Notepad Button widget. You can also optionally choose to allow exports of these documents as PDFs.
The Notepad: New Notepad Button widget allows you to create and export Notepad documents from templates or Workshop string variables.
First, add the Notepad: New Notepad Button widget to your Workshop module. Then, from the configuration options on the right of the screen, choose the Template(s) option and then + Select. From the filesystem view, browse for your Notepad template file to add it to the Document templates list. Next, select the new template entry to open its configuration, then choose a Template version. If there is no version available, open the template in a new tab and publish a template version. Selecting a version will automatically load the template's required input parameters in the Template inputs section.
You can specify a Menu display name for your template if you choose. If you do not set a display name, the Custom text from the Button display settings will be used.

Depending on the template and its version, your Notepad template may consume multiple template inputs. For each of these inputs, link a Workshop variable of the same data type (string, number, date, timestamp, object, or object set) that you would like to use as an input to the template. The current values of these variables will be used to generate your document from the template whenever the Notepad: New Notepad Button is selected.
If your input parameter requires a single object, be sure to link it to a Workshop object set variable that contains one object.
To create a Notepad document from a Workshop string variable instead of a document template, choose the String configuration option from the panel on the right. The variable value may be parsed as Markdown or plain text, in accordance with our existing Markdown features.

You can set the following options for the different document templates and/or string variables you configure for use with the Notepad: New Notepad Button widget:
The on-click options allow you to modify certain behavior when using the Notepad: New Notepad Button:
Additionally, you can specify Workshop events or actions that should be executed when a document is created. For example, this can be used to persist the RID of the newly generated document as an object property by using the Created document output variable from the Notepad: New Notepad Button.
To pass a generated RID to an action, the corresponding parameter must have a configured type class. To do this, open the action parameter in Ontology Manager and add a notepad:notepad_rid type class in the Details tab.
