Render Modal
The render modal is a modal that renders a single skribi template. It can be invoked in one of two ways:
- The Render Template command, which will prompt with a list of templates.
- A Render Preset command, generated by the configured render presets.
When evaluating in a modal, sk.ctx.file
will be null.
The modal element will have an attribute skribi-render-modal-key
with the value set to the rendered template key, for template-specific modal styling.
Render Presets
Render presets are configured template invocations that each create an Obsidian command, which can be assigned a hotkey like any other command. In this way, templates can be used as modals if desired.
Preset commands have the name "Skribi: Render Preset - Preset Name" and the id obsidian-skribi:render-preset_$
, where $
is the unique numerical id assigned to the preset. You can see the numerical id in your Skribi installation's data.json.
Saved hotkeys will persist if Skribi is disabled or the preset name is changed, but will be lost is the preset is deleted.
Render presets are listed in the Skribi Settings tab. To add a new entry, press the +
button. An entry can be deleted with the entry's x
button. The first field is the preset name, which is visible in the command name. The second field is the template key. The third field is the arguments, which should start with a pipe |
and be written in the same format as a normal template invocation.
Like any other skribi templates in render modals will be reloaded if one of their sources is updated, without needing to re-open the modal (so long as Auto Reload is enabled).