Currently, you can copy content from preview mode and paste into a rich text editor (i.e. Google Docs). However, unless you’re using a light mode with a clean white background, you also end up pasting the background color. In addition, you have to manually highlight copy in the preview mode rather than using the Select All shortcut Cmd/Cntl-A, otherwise nothing is copied to your clipboard.
Is it possible to configure Obsidian so that it ignores background styles when copying rich text from preview? Additionally, would it be possible to set Cmd/Cntl-A to properly select copy and work in conjunction with Cmd/Cntl-C?
Current workaround (optional)
My current workaround is to switch to light mode and make sure the theme or snippet has properly set the background to white.
It does, but then you lose all the links and other formatting. Actually I suppose there are several workarounds here, though they all require several additional steps:
use pandoc to generate a full document and upload it, or open it and copy paste from there
open the file in something like Marked 2 and copy/paste from there
paste it into the other rich text editor and reset text color and paragraph background (I just discovered the setting in GDocs, so thank you for pushing me to check)
I don’t know how many others would find a feature like this useful, so maybe it’s not worth baking it into Obsidian, but to my mind, no matter what rich text editor you’re pasting into, and no matter what Obsidian theme you’re using, the assumption would be that most users would want to preserve basic text formatting like headers, bold, italic, hyperlinks, etc., but strip out text color and background styles, relying on the target rich text editor to provide those.
I’ll add my situation to this feature request. I’m using Obsidian at work and my issue is with pasting in an Outlook email when I want to share information, losing formatting this way is kind of a bummer . There are workarounds (exporting to word first, pasting without formatting or using a light theme before copying), but I would love to be able to copy from Preview and pasting directly into a message.
Outlook is the most used email software of the corporate world, so, when I pitched Obsidian to my colleagues as a great software to use, their enthusiasm disappeared when I told them about this situation.
Same thing here with LibreOffice Writer - text from Obsidian can be copied, but:
cannot use Ctrl+A
only with white style
and for some reason it appears in Writer in tiny 6pt font (Writer’s standard is 12pt). The settings in Obsidian is unchanged, font size is at default, 16. I tested copying a text from a new Google Docs document, where the font size is 11pt and it got copied correctly - it is again showing as 11pt in Writer.
Update: I now consider this resolved. The very handy “Copy as HTML” plugin (I think from @bailey) allows you to map a hotkey to its single command. You can copy text from Live Preview mode as HTML and paste it in another app. I’ve tested in the following apps:
Postbox (email client)
All of these render the HTML as rich text, without any background, with a simple CMD-V (tested on MacOS).
Thank you. I would also really appreciate this be a core feature so I don’t need to rely on an external plugin. At this point, I’m using no plugins whatsoever, and I’d hate to sacrifice that security just for this feature.
I’m sorely tempted to do so, at least for a little while, so I don’t have to keep rebuilding the formatting of documents I have to turn in for a class I’m taking that wants them in Word. But it does feel strange to have to do a workaround just to eliminate some extraneous formatting.