Drafts Action Directory

Lines to Drafts

Posted by @RosemaryOrchard, Last update 3 months ago

Converts each line in the current draft into a new draft, and trashes the original draft.

Install

Steps

  • script

    // See online documentation for examples
    // http://getdrafts.com/scripting
    
    var lines = draft.content.split("\n");
    
    for (line in lines) {
    	if (line === 0) continue;
    	var d = Draft.create();
    	d.content = lines[line];
    	d.update();
    }
    

Options

  • After Success Trash
    Notification Info
    Log Level Info

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.