Marked2 and Drafts for Mac

drafts
#1

Good morning,

I’m in the process of setting up Marked2 on my iMac. I don’t get any preview rendered in Marked’s preview window when setting up Drafts as the editor. It works fine in BBEdit.

Anyone with hints or tips ?

¨michael

#2

Marked normally ties directly to a file that’s being updated. My current understanding is that Drafts isn’t updating a file in that sense. Drafts are stored within a database.

You could use the clipboard as an intermediate conduit.

It may be that something is developed (on the Drafts or Marked side) going forward to enable Marked 2 integration - other apps in a similar position seem to have such functionality.

1 Like
#3

Thank’s - I’ll work with the clipboard :slight_smile:

#4

Since ”Mac drafts” does not yet have actions, I export the created draft to DEVONthink pro then drag that file onto marked2 to get a preview.
Not ideal
Actions will arrive eventually.
So they say.

1 Like
#5

Actions will come in time. Greg developed Drafts 5 to enable that across the platforms on his code base. Apparently it is the UI developments all the actions require that he’s got to develop.

Ref. https://forums.getdrafts.com/t/actions-availability/4259

2 Likes
#6

Fair comment.
You @sylumer always give such great and helpful advice in the various forums. I am so glad that you are willing to give such gracious answers to those of us who don’t fully understand the apps we use.
I, for one, am looking forward to the release of Actions in Drafts for Mac whenever they come.
Patience is not my strong point, and if I had a clue about programming, I would be slower to sound critical.
I take every opportunity to encourage my friends to use the iOS versions.

1 Like
#7

There are a couple of different ways of doing this. I use an Alfred hotkey that takes the selected text and triggers the following Bash script

QUERY=$1
TMPFILE=`mktemp -t marked2-preview`
echo "$QUERY" > $TMPFILE
open -a "Marked 2.app" $TMPFILE
osascript -e 'tell application "Marked 2" to activate'

This will create a temporary file and open Marked. Another way is to create a Service through Automator. Create a new Automator workflow (as a Quick Action). Create one step - ‘Run Shell Script’ and place the following shell script in the step:

TMPFILE=`mktemp -t marked2-preview`
cat > $TMPFILE
open -a "Marked 2.app" $TMPFILE
osascript -e 'tell application "Marked 2" to activate'

You can now right click on selected text in Drafts and choose the Marked workflow in the ‘Services’ menu. Or you could assign a shortcut key to it in System Preferences to trigger it.

3 Likes
#8

I also use the clipboard:

  • Cmd-A, Cmd-C in Drafts to put the text into the clipboard
  • Switch to Marked
  • Shift-Cmd-V to “Preview Clipboard”

To make things easier, I created a Keyboard Maestro macro that switches between Drafts and Marked and types those keystrokes. The macro is assigned to Drafts’ preview command (Option-Cmd-P).

1 Like