Move last line to first line

Posted by Austin Ha, Last update about 1 year ago

Move the bottom line of the document to the top!


  • script

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


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