This is a very small addon to make clickable links paste-able into edit boxes.
Edit boxes currently supported:
TinyPad (if it exists)
Ordinarily, when you copy/cut a clickable link in WoW, it strips the control codes so when you paste it elsewhere it's no longer clickable. Instead of [Item of Itemness] you get [Item of Itemness].
This addon will add the control codes when you paste a link you've recently copy/cut (or even seen) from one of the supported edit boxes. The upshot is that pasting links will remain clickable.
__ How it works __
Addons have no access to the clipboard or even what modifier keys are hit while an editbox has focus. It really can't tell if you've cut or pasted.
This addon does basically three things:
Notes any clickable links when an editbox gains focus or changes.
Looks for unclickable links when an editbox changes.
If it has the control codes for an unclickable link, it adds them.
This was originally for TinyPad but since that addon wasn't necessary for this function, plus it was trivial to support any editbox, and I really don't want TinyPad to affect the behavior of other parts of the UI, breaking it out into a separate addon seemed to make more sense.
__ Useless trivia about control codes you may already know __
When you see [Item of Itemness] or [Spell of Spellness] or [Anything Clickable] in WoW, it actually contains many characters you don't see, or control characters. The actual link looks something like:
Only the bold part is displayed. The rest is hidden. All links, including achievements, quests, spells, etc, have the same format:
Sometimes they can be very long. Here's one for Inscription:
That's 148 characters for what looks like 13 characters in your macro window. Which explains why you often can't cram multiple professions into a 255-character macro this way. Watch the character count at the bottom of your macro when you're pasting a profession into one to see it in effect.
__ Adding support for other edit boxes __
Post here if you'd like this to support another edit box. It's trivial to add with an edit box name.
If you want you can edit Linkerize.lua and you'll see a place at the top to add another edit box too.
If you're an addon author:
You can Linkerize:Register(editBox) at PLAYER_LOGIN or later.
Linkerize.lua is in a simple library with version checking so you can copy it to your addon's folder if you want.
If you make changes to Linkerize.lua (you're more than welcome to) then increment the version counter so yours is the one actually loads.
It's safe to register an editBox multiple times. It will only do it once.
I have no delusions that any addon author would actually use this. Just throwing it out there!
07/16/16 008 toc update for 7.0
06/23/15 007 toc update for 6.2
02/24/15 006 toc update for 6.1
10/14/14 005 toc update for 6.0
09/11/13 004 toc update for 5.4
05/21/13 003 toc update for 5.3
08/27/12 002 bug fix
02/03/12 001 initial release