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
- Write the @mention.
- Select and cut the @mention.
- Type the abbreviation for the snippet (I use “;m@”, which stands for “Markdown @”.
Screenshot
Can be found here.
@jackwellborn Reading “textexpander snippet” always gets me. Unfortunately I am a complete script dummy, so I do not understand what and where will happen with your snippet.
@kulturnation I added comments in the script that explains each line and included a screenshot of what it looks like in my TextExpander. Hope that helps!
@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)
@jackwellborn Oh, of course, I do not want to bother you. If you think that using this snippet needs scripting knowledge and I should not try to work with it that is fine for me 🙂
@kulturnation While it is a script, I think it’s basic enough. If it helps, I am also using Word Press and also use the Markdown Extra plugin. Here’s a video with the snippet in action where I type, then cut the mention, and then type “;m@“ to expand.
@kulturnation @jackwellborn FWIW (and shameless plug), I wrote a WordPress filter to automatically make Micro.blog @-name links; depending on what you’re comfortable with or your workflow, it might be a better fit.
@smokey Neat. This might suite my needs nicely. Do you use this with a markdown plug-in as well?
@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.
@smokey Wow, I thought something like this when seeing Jack’s script. Now I have got a clue – this is some levels beyond my abilities (so I still think that one day …) @jackwellborn