[][src]Constant tp_note::config::TMPL_CLIPBOARD_CONTENT

const TMPL_CLIPBOARD_CONTENT: &str = "\
---
{% if clipboard_linkname !='' %}title:      {{ clipboard_linkname | json_encode }}
subtitle:   {{ 'URL' | json_encode }}
{% else %}title:      {{ clipboard_heading | json_encode }}
subtitle:   {{ 'Note' | json_encode }}
{% endif %}author:     {{ username | json_encode }}
date:       {{ now() | date(format='%Y-%m-%d') | json_encode }}
lang:       {{ get_env(name='LANG', default='') | json_encode }}
revision:   {{ '1.0' | json_encode }}
---

{{ clipboard }}

";

Default template used, when the clipboard contains a string. The clipboards content is in {{ clipboard }}, its truncated version in {{ clipboard_heading }} When the clipboard conains a hyper-link in markdown format: , its first part is stored in {{ clipboard-linkname }}, the second part in {{ clipboard-linkurl }}. The following variables are defined: {{ dirname }}, {{ file_stem }}, {{ extension }}, {{ note-extension }} {{ path }}, {{ sort_tag }}, {{ username }}. In addition all environment variables can be used, e.g. {{ get_env(name=\"LOGNAME\") }} When placed in YAML-front-matter, the filter | json_encode must be appended to each variable.