Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.