Action

New draft in current workspace

Posted by Nick Kaczmarek, Last update over 2 years ago

This is a simple action that looks at the current workspace and opens a new draft in the editor using the same tags as defined in the workspace.

Steps

  • script

    /// a drafts script that looks for the current workspace 
    /// and adds a new draft with the associated tags
    /// then opens that draft in the editor
    
    const currentWorkspace = app.currentWorkspace;
    const workspaceName = currentWorkspace.name
    const tags = currentWorkspace.tagFilter.split(",");
    
    let d = new Draft();
    tags.forEach(tag => d.addTag(tag));
    
    editor.load(d);
    

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.