How to make copy&paste of full mentions possible?

We use Discourse Show Fullname in Mentions. Consequently, mentions from rendered posts cannot be copied and pasted into new posts.
Replaced usernames are stored inside the rendered content as a data attribute:

<a class="mention mention-fullname discourse-show-name-mentions" data-full-name="Thomas Kalka" href="/u/toka" data-original-mention="@toka">@Thomas Kalka</a>

I would like to discover a method to ensure that the appropriate mention, in this case @toka, is captured when copying from the rendered text (cooked content) during post creation.

What options exist to customize the algorithm that constructs Markdown content from HTML, specifically for this scenario, such that a[data-original-fullname] is inserted for a.mention-fullname?