Is there a way to real-time preview a draft one is editing in Marked 2 on a Mac?

Draft → export to txt → preview in Marked 2 : too tedious.
Is there any way to use the draft link of UUID ?
thank you

I don’t believe there is currently a way to do this. Marked 2 typically reads from a file. When the file is (auto-)saved, then Marked 2 updates.

Drafts is using a database of notes rather than a file, so I’m pretty sure any alternative would require Greg and Brett (the respective developers) to link something up in Drafts and Marked 2 to work together in that way.

1 Like

thank you. I thought that it would be possible via a note link

I have discussed it with Brett and it’s on the radar. Will likely come along with actions when they make it to the Mac version.

6 Likes

That would be super. Right now I’m using Marked with Sublime Text - which is fine for my blog posts. But for stuff other than my blog posts - which will stay in Dropbox1 - I’d like them to be in Drafts and this would be rather nice.

1 Though I might be persuaded to move it all to Drafts one day.

praise the grand master ! thank you !

I have been using Marks Preview Clipboard function.

It does require being used for each iteration and I find it more efficient than saving a text to a file.

2 Likes

absolutely great idea which I implemented. Thanks very much

Hopefully Greg can implement something for Marked 2’s streaming preview…

1 Like

Curiously enough I posted something on exactly this on the Slack group yesterday.

Expand for Slack post

Haven’t tried it, but in theory I suppose you could create a draft, save a text file to iCloud Drive (or Dropbox, or wherever) and use a replace action to update it in place, no? And then have Marked open/view that file?

Maybe it doesn’t update correctly in Marked because it’s replacing the whole file each time, but it’s just a thought. Haven’t had my coffee yet, so I could be way off. :slightly_smiling_face:

Marked2 streaming preview is in the latest beta release and is working well for me so far.

The caveat with this, like other approaches, has always been that it isn’t real time as you have to manually trigger a refresh.

1 Like

Yeah, I figured it wouldn’t be as nice. Well good to know that the streaming preview is coming, very cool.

Having the beta and Marked 2 how would you suggest I trigger refresh? Preferably something I can do from one of my StreamDecks (or, equivalently, Keyboard Maestro).

Here’s my current set-up for the beta in regards to triggering my use of the streaming preview function.

1. Enabling of Marked 2 Integration

In the Drafts beta I’ve enabled the integration option and I’m simply leaving it enabled.

2. Keyboard Maestro

In Keyboard Maestro I have a macro set-up to open Marked 2 in streaming preview, and drafts, and lay them out on my screen side by side in a preferred proportion.

At the end I just ensure that Drafts has the focus, but I’ll probably extend that in the future to triggering a workspace, selecting the first draft, and putting the cursor at the end of the draft region. That may be something for Drafts AppleScript support to be involved in. It may be something I change up the opening URL for. I might just be sending key pressed with Keyboard Maestro. That’s something I’ll probably look at after the public release including AppleScript drops.

3. Stream Deck & Better Touch Tool

I have set the macro to be triggered both from a key on my Stream Deck, and from a virtual key on my touch bar.

3.1 Stream Deck

3.2 Better Touch Tool

You could of course tie at least some of this sort of interaction into Drafts actions and perhaps even all of it via some AppleScript in this release; if you wanted to have a trigger from within Drafts itself. I might look at that at some point, but as it stands, a global trigger outside of Drafts gives me all of the flexibility I need right now.

@martinpacker, I hope that gives you some ideas on how you might set things up for yourself.

1 Like

Yes. Thank you! I notice BTW a StreamDeck action “KM Link” which I’m unfamiliar with. I’ve been using a short piece of AppleScript to invoke any Keyboard Maestro macro.

There’s more than one way to skin a macro.

1 Like

Agreed. Off topic for here but I found the KM Link plugin. I don’t see a big advantage here over either Applescript or the official plugin.

Wow, that I call a workaround!