Paste from Discourse to Google Doc loses bold

AI-generated summary

Paste from Discourse to Google Doc loses bold issue has been reported by RickThrivingNow. When copying text from Discourse, bold text is not preserved in Google Docs, while italic text remains intact. IAmGav confirmed the issue and found that copying the text into a Gmail email preserves the bold formatting, suggesting the problem lies with Google Docs.

RickThrivingNow discovered a solution by modifying the CSS in Discourse to change font-weight from bolder to bold or 700. This fix allows bold text to be copied over to Google Docs successfully. The issue appears to be a CSS compatibility problem between Discourse and Google Docs.

Has anyone else seen this issue where if you copy/paste from discourse preview window or displayed message that the bold text is not bolded but the italics text is left in italics?

If someone has seen this or figured it out, it would be truly helpful. We need to develop documents in our Discourse but when we paste them into Google Docs and lose the bold, well, it’s a problem. The HTML looks fine, a bolded text

I’m pretty sure it is a Gmail issue, but if there’s a way around it, would be a big help to know.

I copied your text into docs and see your problem.

I then copied your text into a new mail in gmail, and the bold showed. So it seems that something in google docs have changed, or its a bug

I tried to copy it from the new email to docs and it still failed.

It might have something to do with this.
https://9to5google.com/2021/05/11/google-docs-canvas-rendering/

Appreciate you checking. Helps to know another config is seeing the same issue.

I did some CSS testing. Here on Discourse:

b, strong {
font-weight: bolder;
}

If I changed to:

b, strong {
font-weight: 700;
}

then the bold copies over to Google Docs just fine! Even shows as [B] in the toolbar. Oh, and “font-weight: bold;” also works, just not bolder!

I went to /admin/customize/themes/1/common/scss/edit and added b, strong { font-weight: bold; } – now it works for pasting bold! Yay!!

Anyway, at least it looks like a CSS compatibility issue between Discourse and Google Docs for the pasting of bold. Whew!