Action

Insert a simple timestamp & space

Last update almost 3 years ago - Unlisted

The timestamp format is simply ‘hh:mm’ and is inserted right at the cursor location, followed by a space.

Steps

  • script

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

    template
     

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.