Context menu action to apply template from a reference (including emoji)

The current behaviour is to only apply a template if the reference is at the end of/end of the front of the rem, see

Additionally, there should be the option to right-click a reference anywhere in a rem and “Treat as Template” to have the option to bring in any slots. I assume the only potential problem is multiple references inside the same rem being treated as templates, but that also could be turned into a new feature that allows to mix and match multiple templates with their slots.

Possible use case: adding an emoji to mean a media type, e.g. :tv: for video and add slots for references to a channel without having to separately add a “video” tag.

Moved to the new platform