This is an interesting question. As far as I understand, these are basically html snippets, built in a specific way, which are stored in the html content of a document.
I believe is you save the correct content in a document, you'd have the ability to have the tooltip popup to the profile of a user, for example.
But: would the notification still be sent to the user you mention this way? Or what if the specific !App mention requires additional server-side treatment for it to make sense when saved in a document?
I think I figured it out. Below is the following html needed for @mention for user and group:
<a class="jiveTT-hover-user jive-link-profile-small" href="/people/bfeller%40domain.com" data-containertype="-1" data-containerid="-1" data-objecttype="3" data-objectid="2012" _jive_internal="true">Bob Feller</a>
<a class="jive_macro jive_macro_community" href="https://sandbox.jiveon.com/community/it" jivemacro="community" data-orig-content="IT" ___default_attr="2102">IT</a>
You must replace the href tags, data-objectid tag, and ___default_attr tag with the proper username or group name, with their IDs in the other attributes.