5 things you never knew you could do with Drafts on Mac, iPad and iPhone
Drafts Directory: Format Phone Number
let inputNumber = editor.getSelectedText();
// Remove non-numeric characters
const strippedInput = inputNumber.replace(/[^\d]/g, '');
// Check if the input is empty
if (strippedInput === '') {
console.log('Input must contain numerical characters');
context.cancel();
}
else {
// Remove leading '1' if present
let formattedNumber = strippedInput;
if (formattedNumber.startsWith('1')) {
formattedNumber = formattedNumber.slice(1);
}
// Format the number
const regex = /^(\d{3})(\d{3})(\d+)$/;
formattedNumber = formattedNumber.replace(regex, '$1.$2.$3');
editor.setSelectedText(formattedNumber);
}
Drafts (@drafts@indieapps.space)
Drafts Directory: BR Tiger Style
Post: TwitterMastodon
Select file and insert link
Drafts Directory: Copy as Rich Text (adjustable font size)
Drafts Directory: Draftist
MustacheTemplate | Drafts Script Reference
Drafts Directory: Capture with Bear
Upon returning to Drafts, a markdown-formatted hyperlink to the Bear note is placed at the cursor.
*This* is the key reason I decided to publish this action despite the handful of others on the directory that make use of Bear’s grab-url function.
Drafts Directory: Case toggle
Drafts Directory: Search: "@nahumck"
A Decade of Drafts
Drafts Cult | Telegram Group
Drafts Directory: Query SnippetsLab
Using Notion with Drafts - Integration Guides - Drafts Community
Drafts Directory: Zalgos
Drafts Directory: NeoCities
Drafts Directory: Send Draft to Telegram Saved Messages
Drafts Directory: Append to Selected Lines
twitter-workspace-for-drafts/README.md at main · chrisgrieser/twitter-workspace-for-drafts
Drafts Directory: List Action Shortcuts, Comma-Delimited
I hope to properly maintain a public list of my keyboard shortcuts in Drafts.
Drafts Directory: Nahumck Dark
Release Notes - Drafts User Guide