Action

New Draft with Current Tags

Posted by @pdavisonreiber, Last update over 6 years 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.

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
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.