This works well enough for authoring a template, the author types { the variables are shown and replaced using the mentions plugin. 👍
When the template is used, I want the same functionality, but instead of inserting {{user:first_name}} I want it to insert the user's actual name, John. Instead of writing my own insert function, I added an optional value field to the source which gets used on insert:
I was using the plugin to display variable names to authors of text templates.
For instance:
This works well enough for authoring a template, the author types { the variables are shown and replaced using the mentions plugin. 👍
When the template is used, I want the same functionality, but instead of inserting
{{user:first_name}}
I want it to insert the user's actual name,John
. Instead of writing my own insert function, I added an optional value field to the source which gets used on insert:Now when the insert is performed on a match of
{{user:first_name}}
,John
gets insterted instead.