Custom CTRL codes in edit-/reply box
Hello, I was wondering if anyone could help me with adding my own custom CTRL-X key press while editing or (quick) replying.
For example, when I'm typing a message, hitting CTRL-B will put [b][ /b] around the cursor, or around the selected text.
I'm using a hack that shows tooltip links for World of Warcraft items, and this requires people to put the item names between [item][ /item] tags.
What I want to do, is add a keypress, similar to CTRL-B, that instantly prints [item][ /item] on the cursor or around the selected text.
I would really appreciate it, because I also hope it will give me a little better understanding of how this works.
I have been digging through some files, but unfortunately I'm not that familiar with Javascripting so I'm stuck real fast...
|