Insert a simple timestamp

Posted by @scripts4drafts, Last update about 1 year ago

The timestamp format is simply ‘hh:mm’ and is inserted right at the cursor location.


  • script

    let loc = editor.getSelectedRange()[0],
      now = new Date().toTimeString().slice(0, 5);
    editor.setTextInRange(loc, 0, now);
    editor.setSelectedRange(loc + 5, 0);
    // activate is not required if the action is launched via a keyboard button


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