I am wondering if there is currently a way of inserting entity references in rich text areas via scripts or through markdown templates.
The help page on markdown templates seems to show only inserting some attributes as simple text. I thought that using inline javascript might help but I couldn’t find a way of constructing an inline reference and appending it to the rich text field.
A #mention to an entity is constructed in a Fibery-markdown compatible form as follows:
[[#^xxxxxx/yyyyyy]]
where xxxxxx is the ID of the database and yyyyyy is the ID of the entity.
You can use scripting to determine xxxxxx and yyyyyy.
I hope that you already know how to get yyyyyy.
For the database ID, you’ll probably need something like this:
Just in case some else is looking for something similar, here is a how I used markdown to insert a table of outstanding tasks into my “Daily Notes” entries: