Copy or export html?


#1

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


#2

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!


#3

Thanks, will give it a try!


#4

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.


#5

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


#6

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


#7

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.


#8

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.


#9

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?


#10

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.


#11

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


#12

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.

EXP 1
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.

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

EXP 3
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?