Button in Preview Mode to Copy HTML Output to New Draft Email

The HTML in Preview Mode can be copied and pasted into an email body:

It would be awesome to have an EMAIL button in Preview Mode that:

  • copies the HTML output
  • URL encodes it
  • Generates mailto: link with body as URL parameter
  • Open the link

Maybe the note name could be used as the Subject, or some integration with tags.

Also, either a separate ‘default theme’ for emails, or an option to select the theme each time an email link is opened.


Here’s the URL format:

New Gmail

[New Gmail](https://mail.google.com/mail/?view=cm&fs=1&[email protected]&su=SUBJECT&body=BODY&[email protected])

This seems easy enough to do with a script but I don’t know where to start with making this a re-usable plug-in for everyone. Is anyone up to the task?

3 Likes

It might be better to generalize this beyond email.

A one push solution to copy the current note into the copy and paste space in a variety of formats might be really handy. Sometimes I want to paste HTML, sometimes I just want to paste a “processed”/non-Obsidian markdown representation.

3 Likes

Great idea! I love the approach of delivering the same feature but as a more general tool that can be expanded on. :wink:

1 Like