Allow pasting to other rich text editors without background styles from reader (whether dark or light mode)

Use case or problem

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.

Proposed solution

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.

9 Likes

If you paste without formatting, does it work?

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.

5 Likes

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.

4 Likes

+1 on this exact usecase. Would love to get rid of the extra manipulations when pasting into Outlook!

I’ve had the exact same issue!

Maybe this will become moot when they officially roll out WYSIWYG.

If you nest your dark theme vault inside another with light theme, you can have same note open in both and copy only from the light vault.

This is important for me as well.

I would love to copy from preview with a keyboard shortcut and paste into wordpress, etc., only the rich text without any formatting of background style, font size, etc.

Would also love to simply copy and paste HTML. I have a services feature in Mac OS that works for this in my other text editors but no dice here in Obsidian for some reason.

Would also love to one-button export to Marked in the mean time.

Yes, huge annoyance. Would also be nice to be able to copy the text without any internal Obsidian backlinks but with external URL links.

1 Like

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:

  • Microsoft Word
  • Google Docs
  • Microsoft Outlook
  • Postbox (email client)

All of these render the HTML as rich text, without any background, with a simple CMD-V (tested on MacOS).

The plugin is available via Community Plugins.

7 Likes

That is good to know. But let’s keep this open for core obsidian.

5 Likes

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.

Would be nice as core functionality.

I found another user requesting this (Copy without theme styling) where they say:

Typora has this exact feature (Edit > Copy without theme styling)