Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a way to manipulate text in form fields. For example, if I have a large textarea "body" field, from my browser I want to be able to highlight a piece of text in that textarea, for example:

www.example.com

And hit a shortcut key to transform it into:

<a href="www.example.com" rel="nofollow">www.example.com</a>

I'm thinking maybe a regex replacer or macro. Is there some kind of free broswer plugin (ideally for firefox) that would allow me to do this?

share|improve this question
2  
This can be done easily with AutoHotkey or similar macro software. Which OS are you using? – iglvzx Dec 6 '11 at 18:22
    
sorry windows 7 – User Dec 6 '11 at 18:57
up vote 0 down vote accepted

Ok I was able to do this with AutoHotKeys as suggested by iglvzx. I used the AutoHotkey_L version

Here is my auto hot key script:

#space::
Send ^c<a href="^v" rel="nofollow">^v</a>
return

To use, I highlight the url I want:

www.example.com

And press Windows-key and spacebar. It gets transformed to:

<a href="www.example.com" rel="nofollow">www.example.com</a>

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .