Action

Move last line to first line

Posted by Austin Ha, Last update about 6 years ago

Move the bottom line of the document to the top!

Steps

  • script

    var lines = draft.content.split("\n");
    
    let lastLine = lines.pop();
    
    lines.unshift(lastLine); // add to front
    
    draft.content = lines.join("\n");
    
    draft.update();

Options

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