Copy paste from google docs breaks @ mentions

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.

If I’m right about what I think is happening, this doesn’t really seem specific to Google Docs, but rather a workflow problem.

When you have a group mention (e.g. @staff) it gets baked with a link to the group’s URL. So what seems to be happening is they’re copying the rendered post instead of the post’s source.

Instead of doing so, they should copy the post source to avoid this happening.

A Discourse feature that may make sense for your use case is our “Shared Drafts” feature.

4 Likes

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.

1 Like

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

3 Likes

I guess you’re set @tobiaseigen? :smiley:

3 Likes