Insert Wikilink

Posted by Garbonsai, Last update about 2 years ago

Inserts a wiki-style [[Title of Draft]] link to a draft selected using Quick Search. Uses a temporary workspace to sort search results alphabetically.


  • script

    // build a temporary workspace
    let ws = Workspace.create();
    ws.loadFolder = 'all';
    ws.setAllSort( 'name', false );
    // show Quick Search
    let d = app.selectDraft( ws );
    // insert a wikilink to the selected draft
    if ( d ) editor.setSelectedText( `[[${d.displayTitle}]]` );


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