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?

link|improve this question

62% accept rate
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
feedback

1 Answer

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>

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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