Last active
August 29, 2015 14:07
-
-
Save LK64076007A/52dc7175ed60a98cd5ad to your computer and use it in GitHub Desktop.
This is some JavaScript that prepends the date to each line of some text in Drafts 4 for iOS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var date = new Date().toISOString().replace(/(\d+-\d+-\d+).+/gm,'$1 '); | |
draft.content = draft.content.replace(/^/gm,date); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment