Open saved draft in floating window?

Hello. I was watching a video in full screen and opened a Quick Capture note to jot things down, and it was perfect - I could float the new note over an unused part of the video.

However, it’s a long video and I didn’t finish watching, so I saved the note to the Inbox. Is there any way to open the note so it floats again? If I just open it in a new window, I can’t watch the video in full screen and still take notes.

The main window can be toggled in and out of floating mode either via the “Float on Top” menu command in the Window menu, or the icon at the top right of each window.


Thank you.

Just to let you know, the floating window seems to work on non-full-screen windows, but doesn’t work on the full-screen window. I’m not sure what’s different between the Quick Capture window, which DID float over full screen, and the float icon on the non-Quick Capture window, but clearly there’s a difference.

I am looking to open one specific note as a floating window every time I press a specific KB shortcut. Any idea if there is any way to achieve that?

There is a JavaScript function in Drafts to do it that you can use in a script action step - openInNewWindow.

You can assign a keyboard shortcut to your action.

If you want a global keyboard shortcut (one that works outside of Drafts), you could do that too by calling the Drafts action via URL scheme from another automation tool (Alfred, Keyboard Maestro, etc.) and assigning the global shortcut, or you could use Apple Shortcuts to trigger it ditectly, and assign the keyboard shortcut to the Shortcuts shortcut (Apple really could have chosen a better name for that automation platform!)

Hope that helps.

Thanks for the response. Unfortunately, I am not a developer and I just couldn’t figure out how to go about scripting it. The best I could come up with was app.currentWindow.openInNewWindow("3761F6A8-5E08-4E29-A48C-7D360D87810F");

A little more help to the right direction will be greatly appreciated.

You are headed in the right direction. The method wants draft object, not it’s unique identifier as the parameter. You can use the identifier to get the draft, however, like:

let d = Draft.find("UUID-OF-DRAFT")

So, I tried the above code in 3 variations, and each of them got the same error message. Still don’t know what is it that I am doing wrong :man_shrugging:

Full Code

// See online documentation for examples

let d = Draft.find("3761F6A8-5E08-4E29-A48C-7D360D87810F");

Error Message

Script Error: TypeError: app.currentWindow.openInNewWindow is not a function. (In 'app.currentWindow.openInNewWindow(d)', 'app.currentWindow.openInNewWindow' is undefined)
Line number: 5, Column 34

Here’s a screenshot of the extension window:

What version of Drafts are you running?

I’m currently not on my computer but whatever the latest version is.

Apologies, the correct syntax is:

let d = Draft.find("3761F6A8-5E08-4E29-A48C-7D360D87810F");