Jump to content

iA Writer Markdown (format link or image)


Recommended Posts

!!! Follow this link to the newest version instead - this version supports both Safari and Chrome, and any markdown application you "throw at it".

 

iA%20Writer%20Alfred.png

 

 

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):

 

Skjermbilde%202013-05-01%20kl.%2023.47.4

 

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 by MacGeeky
Link to comment
  • 1 month later...

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!

Link to comment

!!! 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).
 
51c5f33ee4b06bfd942a2389.png
 
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
 
tips%20markdown%20alfred.png
 
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:
 
markdown%20help.png
 
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 by MacGeeky
Link to comment

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 by MacGeeky
Link to comment

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)

Link to comment

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 by MacGeeky
Link to comment

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 by Vítor
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...