Action

Go To Bookmark

Posted by agiletortoise, Last update 4 months ago

Open a bookmarked draft in the editor.

This action will prompt you to select a draft from all drafts tagged with the “bookmarked” tag. Useful to quickly navigate to specific drafts you use often.

Meant as an example action demonstrating the use of the “Select Draft” prompt combined with a custom, temporary workspace.

To use a tag other than “bookmarked”, edit the tag variable in the first line of the script.

NOTE:: This action works great with widgets. Assign it as an action in a grid widget on your Home Screen to quickly jump to the right place.

Steps

  • script

    if (!app.isPro) {
    	alert("This action utilizes Workspaces, and requires Drafts Pro")
    	context.cancel()
    }
  • script

    // configure tag used to identify bookmarked drafts
    let tag = "bookmarked"
    
    // create workspace
    let ws = new Workspace()
    ws.name = "Bookmarks"
    ws.tagFilter = tag
    
    // prompt to select draft
    let d = app.selectDraft(ws)
    
    // if a draft was selected, open it
    if (d) {
    	editor.load(d);
    	if (device.systemName == "iOS") {
    		app.hideActionList()
    	}
    }
    else {
    	context.cancel()
    }

Options

  • After Success Default
    Notification Error
    Log Level None
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.