Drafts Action Directory

Lines to Drafts

Posted by @RosemaryOrchard, Last updated: 2018-07-04 05:44:49 UTC

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();
    }
    

Comments

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