About
This script adds Ctrl+B (bold), Ctrl+I (italic), Ctrl+K (code), and Ctrl+L (link) shortcuts to comments.
My script doesn't work exactly the same as the question/answer text editors, but it's similar. One difference is that hitting Ctrl+B when no text is selected just puts ** in the window, as opposed to putting **strong text** with "strong text" selected. This means you can use the shortcuts like you would in a word processor: hit Ctrl+B to enter bold mode, type what you want, then hit Ctrl+B again to back out. (Actually the question/answer text editors behave similar to this, but uses trickier javascript to accomplish it.)
For links, I'm using simple JS prompt() function, rather than trying to hook into the text box that is built-in for adding links questions/answers.
Download
Change History
- 2012-03-26: Added support for Ctrl+L
- 2009-07-18: Initially released
Platform
Tested on Firefox 3.6 and Chrome 9.0, on Windows 7. Requires Greasemonkey on Firefox.
License
Do whatever you want, as long as you don't sell it or claim you wrote it yourself. If you make any cool modifications, let me know!
loving it!– Cerberus Jun 2 '11 at 21:43