I’m looking for a solution for
Is there a way how plugins / components could decide which code is pasted via copy & paste?
I’m looking for a solution for
Is there a way how plugins / components could decide which code is pasted via copy & paste?
Could you elaborate a bit more? I don’t think I’m fully understanding. As I get it, full name mentions display on copy & paste, but username mentions are normal ones in posts? Or the fact that copy and pasting fullname mentions doesn’t transfer over?
Hallo Thomas!
Can you share an example to illustrate what you mean? You can write in German if you prefer and your post will be auto-translated for us.
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?
Are you copying the discourse way, using the popup that appears when you select some text in a post? I believe that works as you would expect but have not tested it lately.
Edit: oh, wait. Just reading this more carefully. This is not an official theme component so to get support for that component, you want to reply in that topic. I think what you are describing may be a bug.
Given this is a discussion about an unofficial theme component, let’s keep it on that topic.