Hacker News new | ask | show | jobs
by tta 2109 days ago
This is doable via a shell script (+ pandoc):

  # 1. Put markdown on clipboard
  
  # 2. Convert to hex
  out=$(pbpaste | pandoc -f markdown -t html -s | hexdump -ve '1/1 "%.2x"')
  
  # 3. Convert to an applescript data class
  osascript -e "set the clipboard to «data HTML${out}»"

  # 4. Paste rich HTML
You can use something like Alfred or Keyboard Maestro to trigger that script with a keyboard shortcut.
1 comments

Very clever! Thanks for sharing!

As a programmer, having native markdown support in the app is something I wish for almost every day (especially for code blocks). It's something I plan to add.

That would for sure get me to pay for it tbh never even thought of that as a feature