Drafts Action Directory

New Draft with Current Tags

Posted by @pdavisonreiber, Last update 3 months ago

Creates a new draft with the same tags and syntax mode as the current draft. Keyboard shortcut is ⌘ shift N to complement ⌘ N for the built in new draft shortcut. Useful for creating new notes while working in a workspace.

Install

Steps

  • script

    // New Draft with Current Tags
    
    var newDraft = Draft.create()
    
    newDraft.languageGrammar = draft.languageGrammar
    
    for (tag of draft.tags) {
    	newDraft.addTag(tag)
    }
    		   
    newDraft.update()
    editor.load(newDraft)

Options

  • After Success Nothing
    Notification Error
    Log Level Info

Comments

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