Insert timestamp

Is it possible to insert a timestamp (ideally with keyboard shortcut) when writing in markdown?

1 Like

Hi Johannes,

Thank you for the question.
Yes, you can do that by adding custom script:

const moment = require('electron').remote.require('moment')

inkdrop.commands.add(document.body, {
  'custom:insert-date': () => {
    const cm = inkdrop.getActiveEditor().cm;
    cm.replaceSelection(moment().format('LLLL') + "\n");
    "label": "Format",
    "submenu": [
      { "label": "Insert Date", "command": "custom:insert-date" }

And bind a command custom:insert-date with preferred keystroke by setting keybindings like so:

  'shift-ctrl-k': 'custom:insert-date'

Hi Takuya,

thanks a lot for your prompt reply. It works perfectly :slight_smile:

All the best,

1 Like