My TextExpander snippet for creating micro blog mention urls

I created the JavaScript snippet below to help create mention urls.

Script

var textExpander = Application("TextExpander"); //Get TextExpander (this may not be necessary)
var app = Application.currentApplication(); //Get the current application so TextExpander can get access to the clipboard.
app.includeStandardAdditions = true; //Standard Additions is also necessary to access the clipboard.
('[' + app.theClipboard() + '](https://micro.blog/' + app.theClipboard().substr(1) +')'); //Construct and return a Markdown URL using the clipboard data. 

Usage

  1. Write the @mention.
  2. Select and cut the @mention.
  3. Type the abbreviation for the snippet (I use “;m@”, which stands for “Markdown @”.

Screenshot

Can be found here.

  1. @jackwellborn The screenshot helped a lot – I forgot to choose “JS”. But I still try to find out in which application you use it and where this mentioning URL goes to. I have the idea that it is something about interacting between WP and mb? (= still a book with seven seals)

  2. @jackwellborn I don’t—I may be the only person who doesn’t normally blog in Markdown 😉 I haven’t heard any reports of problematic interactions, though; this acts right before the post is written to the DB, so I believe the Markdown has already been rendered into HTML.

Comments are closed.