MacGeeky Posted May 1, 2013 Posted May 1, 2013 (edited) !!! Follow this link to the newest version instead - this version supports both Safari and Chrome, and any markdown application you "throw at it". This workflow has 2 uses in iA Writer - to format text links and images (html, IMG tag). Text links To format a markdown link - In iA Writer you select the text you want to use as anchor text in the link, then you use the workflows shortcut or the Alfred command 'link' (no argument). A textbox will appear, prefilled with the URL from the frontmost Safari tab. The user can change this URL before proceeding. When you press 'Enter' the selected text in iA Writer will be formatted as a text link in markdown. Images To insert a image in iA Writer with this workflow, you do as follows: 1. First, make sure you copy the image URL from the web to the clipboard. 2. Activate Alfred and use the following command(s): the number after the tag 'IMG' is optional, and will set the width of the image you format. Dependencies - iA Writer running - IMG insert needs a pre-copied URL in the clipboard before executing the command. Download iA Writer Markdown Help 1.1 Edited July 11, 2013 by MacGeeky
panrubius Posted June 22, 2013 Posted June 22, 2013 Hi there, First off, this is a brilliant workflow and something I would probably use dozens of times a day but I have a slightly different workflow. What I would like to be able to do is: Grab the link from the frontmost Chrome window and if possible, extend this functionality to other Markdown editors; do you have any idea how I might go about implementing these changes? Any help you could give me would be really useful, because I would use this workflow so much!
MacGeeky Posted June 22, 2013 Author Posted June 22, 2013 (edited) !!! Follow this link to the newest version instead - this version supports both Safari and Chrome, and any markdown application you "throw at it". Hi, If you download this workflow, it grabs the URL from Chrome instead of Safari. But you have to add the name of the application in the Applescript codes. If you open the workflow after adding it (the new one) in Alfred, and then open the the top AppleScript (marked as number 1 in the image below). Then you'll change the following text (marked in the image below) to the name of the Markdown application you would like to use: Markdown Application After that you open the second Applescript (number 2 in the first image in this post), and add the name of your Markdown application here too: Hope that helps, just ask me for help if it doesn't. I'll most likely update this app in the future to accept more MarkDown Apps and browsers. Maybe the best way to do this is to change the workflow to use the frontmost application instead of a hardcoded app name - I'll implement it later Edited July 1, 2013 by MacGeeky
MacGeeky Posted June 26, 2013 Author Posted June 26, 2013 (edited) Could someone please help by testing this new version? This version chooses the frontmost application as the markdown application to insert the text link / image in. Keyword: markurl The first time you run the workflow, you'll choose between Google Chrome and Safari as the browser to grab the URL from, it should be remembered. If you want to reset the browser choice - use the following keywords: markurl reset Edited June 26, 2013 by MacGeeky
funkymonkey Posted June 26, 2013 Posted June 26, 2013 Could someone please help by testing this new version? This version chooses the frontmost application as the markdown application to insert the text link / image in. Keyword: markurl The first time you run the workflow, you'll choose between Google Chrome and Safari as the browser to grab the URL from, it should be remembered. If you want to reset the browser choice - use the following keywords: markurl reset Works fine for me thanks. (using FoldingText)
MacGeeky Posted July 1, 2013 Author Posted July 1, 2013 (edited) New version and new name in this thread! What's new? New name: Markdown Help Not dependent of iA Writer anymore! The new workflow uses the frontmost application instead. The first time, and only the first time, you run the new workflow, you get to choose between Safari and Google Chrome as the default browser to grab the URL from. This is easy to reset later by using the following keywords (without the quotes, of course): "markurl reset" You can download the new version directly here, but it's recommended to follow the link to the new thread instead. Edited July 1, 2013 by MacGeeky
vitor Posted July 1, 2013 Posted July 1, 2013 (edited) If you want to add support for more browsers, you can check the Applescript for them on this post. Edited July 1, 2013 by Vítor MacGeeky 1
MacGeeky Posted July 1, 2013 Author Posted July 1, 2013 If you want to add support for more browsers, you can check the Applescript for them on this post. Thanks! It seems to be no way to grab the url in Firefox?
vitor Posted July 1, 2013 Posted July 1, 2013 (edited) Thanks! It seems to be no way to grab the url in Firefox? Like I say it the post, it is technically possible, but not in an “official” manner. You have to send keystrokes to go to, select, and copy on the url bar, or in some cases do it via javascript, and all of these are error prone in one way or another, so I prefer to simply not include it in my workflows. Edited September 19, 2013 by Vítor
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now