DEV Community

Nick Karnik
Nick Karnik

Posted on

Changelog: Updates to the comment box

Hello DEVs! A few hotkeys are now supported in the comment box. All the commands will accept Ctrl or Cmd as the control key. Also, the character following the control key is case insensitive.

demo

Bold

You can simply highlight text and press Ctrl+B or Cmd+B to make the text bold.

Italic

Similarly, you can highlight a word and press Ctrl+I or Cmd+I to turn the text into italics.

Link

Pressing Ctrl+K or Cmd+K will surround the highlighted text with a link tag and place the cursor on the location where you need to type in the URL. Make sure to prefix it with http(s):// or it turns it into a URL relative to dev.to.

Hotkey to Submit

You can press Ctrl+Enter or Cmd+Enter to submit your comment instead of having to click on the submit button.


I was thinking about adding a hotkey for the image tag, but I'm not sure if there's a universally preferred key combination for it? Please let me know your thoughts in the comments.

You are also welcome to make feature requests or file bugs on the Issue Tracker.

Known issues

  • IE 8,9,10,11 are not supported.
  • After using a hotkey in the comment box, the undo functionality in FireFox is a bit flaky. If FF doesn't fix that issue in subsequent releases, we may need to consider integrating a custom history tracker.

Top comments (3)

Collapse
 
computersmiths profile image
ComputerSmiths

Umm, you might have broken something? In IOS I can enter comments in Safari but Echofon (Twitter client with chronological order and no ads) just sits and spins when I hit submit. Hmm, might be intermittent, hangs on Warshield post, works on another.

Collapse
 
theoutlander profile image
Nick Karnik • Edited

My change didn’t modify existing functionality, so the issue might have always been there. Besides, I don’t think there’s a key combination on iOS to do this sort of thing. Unless, I’m missing something?

Collapse
 
patricktingen profile image
Patrick Tingen

Wow, great addition, so intuitive. Tnx!