Drafts Action Directory

Copy to ios Clipboard

Posted by @richtack, Last updated: 2018-05-27 15:46:27 UTC

A simple copy of the draft to the iOS clipboard, with a prompt asking if you want to archive the draft after copying.
Useful if you both frequently want to copy and move on, as well as copying mid-work.

Install

Steps

  • clipboard

    template
    [[draft]]
  • script

    // See online documentation for examples
    // http://getdrafts.com/scripting
    
    var p = Prompt.create();
    
    p.title = "Archive After Copy?";
    
    p.addButton("No");
    p.addButton("Yes");
    
    var didSelect = p.show();
    
    if (p.buttonPressed == "Yes") {
    
    	draft.isArchived = true;
    	draft.update();
    	editor.new();
    	editor.activate();
    }
Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.