Copy/Paste HTML Preview into Gmail!

Obsidian is AWESOME!!!

I just realized the HTML Preview can be copied/pasted into Gmail with all images, formatting, and background color!!


Just bought a commercial license! :smiley:


And it copies the formatting from your current theme, so you can quickly switch themes before copying. I’m working on a custom theme just for emails!

1 Like

If the reverse is true, I can archive gmail messages to Obsdmd.

Any text editor that recognizes HTML will support copy/paste in this way: Google Docs, Microsoft Word, etc.

Hi @sam.baron,

I prefer typing my emails (and notes) in markdown so I can apply formatting as I type and not mess with the mouse. But yes, the copy/paste would work in other editors.

I like this solution because I can easily swap themes on the note before copying, and the css is easy to edit to create custom themes. I see a lot of automation potential once the API is released.

I wasn’t suggesting otherwise. I have the exact same workflow :smiley:.

Just making sure anyone who reads this topic knows that you can do more by copying/pasting HTML from preview mode besides write emails.

It would be great to have a future plugin that creates an email from a markdown note.

1 Like

YES! I’ve been thinking about this for a few days. This would be awesome!

We would also need a way to handle local images. The copy/paste HTML works on images when you use <img src="https:...> with a full URL, but images don’t copy with local links.

So you have the extra step of hosting images online first and gathering the links, or copying text only and inserting images in the Gmail editor after pasting.

@GreenFlux Please create a post in #plugins :smiley:

1 Like

Will do. Meeting starting soon. I’ll add a new post this afternoon. Thanks!

1 Like

I’m a complete newbie to Obsidian, and was wondering how exactly you “open” the HTML preview for a note?


The ‘Form’ icon next to the Link button enters Preview Mode

Also, in the (…) menu to the right of the X, you can Split the view, and make one view for Edit Mode and one for Preview Mode.

Then, click the Link button in one version and select the other to sync scrolling.

I have an AHK that (kinda) does that… I blagged it from the ConnectedText forum. Credit to Manfred Keuhn

send e-mail directly from Obsidian @keuhnm

` & m:: ;send e-mail
Gui, Add, Edit, W300 vemail,
Gui, Add, Edit, W300 vsubject,
Gui, Add, Edit, W300 R20 vbody,
Gui, Add, Button, Default, Send
Gui, Show
Gui, Submit, NoHide
if email = Email
if message = Message
Run, mailto:%email%?subject=%Subject%&body=%body%
Gui destroy

1 Like