Markdown Shortcuts and MS Word Export

I currently use a combination of Drafts and Ulysses for writing on my Mac. I’m interested in going all in on Drafts, but there are a couple of Ulysses features that I’d love to see improved in Drafts in order to make that happen:

  1. Formatting with keyboard shortcuts. In Ulysses, when you type command+B, it seems to automatically wrap the text you’re about to write with two asterisks on either side of the test. Then, if you hit Return, the cursor jumps to after the second set of asterisks. This makes typing in Markdown quicker and easier.

  2. Export to Microsoft Word. Ulysees is the only markdown editor that exports really well to Word. The headings, bullet-pointed lists in particular work much better than Bear (for example). I know there’s a action on the iOS version of Drafts to convert to Word that uses Shortcuts. It’s pretty good but doesn’t handle indented bullet lists or default to Calibri font.

Are either of these items on your roadmap?

Thanks for a great product.

Chris

As far as #1, things like applying formatting are done with actions in Drafts, and they can more or less do anything to the text and behave in any way you want - with appropriate customization. The default Markdown action group that ships with Drafts has a “bold” action which does what you describe, and, by default, is assigned to the keyboard shortcut ⌘-B.

It’s possible this action was deleted from your installation, or the keyboard shortcut re-assigned, but you might want to reinstall that default group (from the link above) and you should have that functionality back (as well as ⌘-I for italics, and some other common Markdown tools).

Per #2, it’s certainly something that may happen. Word format is very complicated, and it’s not a feature I’ve had many inquiries about, so it’s not something I’ve spent time on. In the meantime, you certainly can easily use a Ulysses action to send text you have composed in Drafts to Ulysses when/if you need to export as Word. Maybe not a great solution, but certainly works if it’s just something you do periodically.

Have you tried exporting to word via this app?
‎makeDoc on the App Store

Not sure it will fit the bill though.

1 Like

For converting to Word on the Mac, you could just export a markdown file and then run it through pandoc to convert it. That tool works really well to convert md -> docx and you can even use custom Word templates for formatting.

3 Likes

I tried using MakeDoc and MakeSlides - both from the author of iThoughts.

While they work they aren’t very flexible in styling. In the end I wrote my own Markdown to pptx converter, using the excellent python-pptx package.

I’m not sure if the same could be done for .docx.

Meanwhile, I assume RTF is not good enough.

1 Like

@chrissalter

Hi, found an online html to doc converter and I made an action that makes styling and conversions quite easy.

You have to make a few taps or clicks, but it works well on iPad, and seems to work well with your own css style sheets. They can be included as files with this template tag:[[template|css/georgia.css]] instead of [[georgia]] used in the current action:

https://actions.getdrafts.com/a/16H

Using: https://document.online-convert.com/convert-to-doc in Safari.

This seems to work pretty well in tandem with my action, but I haven’t tested with all kind of styles …
(Their html to docx conversion didn’t work as well, not converting styles correctly.)

And of course, this is not for sensitive documents as I have no idea about the companies who developed or is hosting this site.

It’s Hetzner Online GmbH, Germany

But they seem to be based in Germany though, where they have quite strict privacy rules in place.

I don’t have a Drafts iOS -> Word solution for you, but I just use Pandoc on my Mac. The best part of it is that it maintains different headings as separate formatting styles.

I don’t know if anyone has made a Drafts action for it, because right now I’m just using the package someone made for Sublime Text for Pandoc, as I’ve grown to trust the presets that package has.

2 Likes

That would be an interesting thing for someone to install on a Raspberry Pi. That - with a battery - is a bit more portable than an Mac(Book).

I’m talking about using it with Drafts on the Mac already. Using something as a server with an iOS device would be a lot to mess with. You could probably set up an action to pass it to a shortcut that SSHes to said raspberry pi, but that’s still not actually a practical solution for trying to do this on mobile.

1 Like

For me “portable” means “can do on a tray table at 35,000 feet without wifi”. :slight_smile:

Or at least it was. :frowning:

I have been using “Marked 2”, on my mac, which includes a range of abilities for interpreting markdown from a drafts file and converting it into various output forms, including Microsoft Word.
The hash tags ## ### #### etc ar converted to Heading 2,3,4 etc., and the bold and italic work well. I have tried underlining much but i am sure it works too.
It works well and is being continually updated by the very able @ttscoff

1 Like

As a side note, I do a lot of exporting to Word on iOS (would love if this came to Drafts). iA Writer has an excellent markdown-Word feature that I use heavily.

1 Like

Would RTF (Rich Text Format) be good enough? That’s a vaguely text format that might be doable.

Thanks - I found pandoc too confusing.

My workaround is to copy the draft as RTF and paste without formatting into Word. Not 100% what I was looking for, but pretty close.

for my #1 question, I got exactly what I was looking for by using this action for bold and this for italics and assigning keyboard shortcuts. Awesome! It puts the cursor between the asterisks.

I didn’t think RTF was that complicated, even with formatting embedded.

A programming challenge for someone?

1 Like

The problem with RTF is that it doesn’t properly translate outline hierarchies to Word (this is Word’s fault).

2 Likes