Action

Insert date

Posted by Saltlane, Last update over 4 years ago

Inserts the current date/day at top of a draft as a markdown header and leaves the rest of the draft as it is. Useful if you want to change a draft into a journal entry. The template step lets you add any date format you want.

Steps

  • defineTemplateTag

    name
    InsertDate
    template
    # [[date|%m%d %A]]
    
    [[draft]]
  • script

    // insert date at top
    draft.content = draft.processTemplate("[[InsertDate]]");
    draft.update();

Options

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