Copy or export html?

Perhaps I’ve missed it but is there a way to copy or export to html?

The app did not ship with an example action for that, but if you duplicate the “Copy” action, and change the template from [[draft]] to %%[[draft]]%% it will put the HTML output of the Markdown processor in the clipboard.

The double percents tell the template to run the contents through Markdown. More detail in docs, so the same applies to other actions, if you want to output to file, etc.

Hope this helps!


Thanks, will give it a try!

Good tip. How would I add to the action the ability to share to another application? I want to share text to Newton which doesn’t have a URL scheme. However, if I can covert to HTML and open share extension, that might work for me.

There is also an extensive clipboard action where you can copy as HTML, as well as a number of other options.

This action shares the draft converted to HTML. Instead of sharing [[draft]] via the share action step, it shares %%[[draft]]%%.

Thanks. The action works great. I guess I don’t actually want html. When I copy to my email app (Newton) I see a bunch of stuff in < >. I guess I’m looking for something that would show the bold, and italics and lists. Is that rich text?

Sorry For the newbie question.

Yes. That would be rich text.

Check out the rich text option in @nahumck’s action above (which I think is based on the Copy as Rich Text action by @agiletortoise in the directory.

You could probably modify either to be a share sheet version rather than clipboard if required.

Thanks everyone. I’ve tried @nahumck action in Newton with rich text and it still looks goofy. I’ve tried the Markdown Mail action and it works great, with the exception is that it used ios Mail. Is there a way to get the same format as the Markdown Mail option to open the share sheet instead?

Try pasting the results into another app.

If it still looks goofy in the same way the issue is with the Drafts side of things and could be the draft content or the action.

If it looks fine then the issue is with Newton.

Let us all know the results.

Ok, here are my results. I was trying to export a bulleted list with some bold text

  1. Using Markdown Mail action - format looks great, as I’d expect
  2. Tried clipboard action @nahumck suggested. I copied rich text into ios Mail, Newton, and Outlook. The formatting was preserved but the font size shrunk for some reason. For comparison, the attached screenshot from ios Mail shows results from Markdown Mail action (on the left) and the Clipboard action (on the right). The results from Newton and Outlook were the same (ie formatting preserved but font size shrunk).

Even though it’s a small thing, I prefer the look of the markdown mail. I’m not a big fan of ios mail which is why I’m trying to get this to work for Newton. Thanks for the help

From what you posted I still wasn’t clear on the underlying issue. It sounds like the font size was shrinking in each mail system. To that end I installed Newton mail and carried out a few experiments.

I took a Newton mail with existing text (the little Newton mail signature), ran the copy rich text to clipboard functionality within Drafts and pasted the result into the mail. The result was identically sized text throughout.

I pasted the rich text into Newton mail, iOS Mail and Microsoft Word. All results looked pretty similar; maybe even identical.

I used the Markdown Mail action from the actions directory and created a mail from the draft. The sizing looked similar to that of Newton Mail. I then pasted the rich text still on the clipboard onto the end of the same mail … and the pasted text was actually bigger. That’s the opposite of what it sounds like you have been seeing.

This leaves me unfortunately even more confused about what is going on for your scenario.

Could you repeat this first and third experiments from above and post the results?


I’m searching for a way to put in the clipboard the HTML content of a Drafts note as an HTML object:

  • exporting the HTML using %%[[draft]]%% only copies a text object in the clipboard and when pasted (in my browser’s GMail compose window) shows the raw HTML
  • exporting as Rich Text looks nice, but removes all links from the generated output

The only solution I have today is to open the preview window, select the body and copy/paste it with my mouse.

Anyone knows if this is doable with Drafts today?

Are you sure? This action gives me workable links when I paste into Apple Mail.

1 Like

Indeed, links in Rich Text Format work well in Safari, Brave and Chrome, but not in Firefox.

I suppose this is a limitation of Firefox itself. That’s always good to know…