从 Google Docs 复制粘贴会破坏 @ 提及功能

I’m not sure this is an actual bug or if anything can easily be done about it, but in our community we ran afoul of a behavior that is unexpected. Many members work offline on posts, then copy/paste them from e.g. google docs into discourse. In most cases, the formatting and syntax transfers correctly and beautifully. It’s not 100% perfect, though, so I have been nudging colleagues to sanity check after posting and also doing some ninja edits myself on their posts to fix formatting and syntax.

@ mentions transfer as hyperlinks that look correct in the preview and in the published post, but are actually not @ mentions. So they sneak through unnoticed… the screenshot below is of an important announcement that should have been delivered to the email inboxes of all staff, but was not. It was only a few weeks later when troubleshooting that we noticed the syntax was off. Oops.

如果我的判断没错,这似乎并非 Google Docs 特有的问题,而是工作流程方面的问题。

当你使用群组提及(例如 @staff)时,它会被嵌入一个指向该群组 URL 的链接。因此,目前的情况似乎是:用户复制的是渲染后的帖子内容,而非帖子的源代码。

为了避免这种情况,他们应该复制帖子的源代码。

对于你的使用场景,Discourse 的一项可能适用的功能是“共享草稿"。

This is a message with an @tobiaseigen mention, written in google docs. I am going to paste it into a post and see what happens. :rocket:

Hmm… you are right. I will check in with colleagues on their workflow. Maybe they can show me the google doc they use. The main issue is that we have some announcements professionally translated. The translators are not members of our community but are given access to a google doc to do the translation. So we can’t rely on the shared drafts feature or a discourse-based solution. Generally also we have folks who work offline much of the time so they draft offline and then copy paste. Hilarity ensues.

OK - thanks @supermathie I can confirm this is a workflow problem not a functionality problem. Nicely diagnosed! :seedling: And appreciate the time taken to help figure it out. Many thanks.

Here’s what the google doc source looks like - and the @ mention is a fully baked hyperlink. So someone most likely wrote it in the composer on discourse and copy/pasted from the preview into google docs.

56%20AM

我想你已经准备好了,@tobiaseigen:blush: