8

Screenshot / Code Snippet

CommentAssist Demonstration - Spectric

In action:

CommentAssist-DemoGIF-SpectricSO Not loading?

About

Makes it easier to write mini-markdown in comments, especially for new users on Stack Exchange. It introduces a toolbar and keyboard shortcuts.

Compliant with Stack Overflow Design Standards. Does not use deprecated grid

Use

To apply the effect, click the corresponding icons (or their shortcuts). They styles are listed as so:

B I <> 🔗 "
Bold (Ctrl + B) Italics (Ctrl + I) Code (Ctrl + K) Link (Ctrl + L) Quote (Ctrl + Q)

When applying styles, you can either:

  • First select the text to apply the style, then click the style icon. This will apply the style to the selected text.
  • Directly click the icon. This will append the markdown style to the textarea with the cursor already in the proper position so you need not adjust the caret position.

License

MIT License

Download

Version 1.2

[ Minified | Unminified ]

Platform

Browser Support

Script is deemed supported if core functionality works

IE Chrome Firefox Safari Edge Opera
✔️ 9 ✔️ 4 ✔️ 2 ✔️ 3.1 ✔️ 12 ✔️ 12.1

Contact

Author: Spectric. Stack Overflow, Github

Should you find a bug or have a suggestion, feel free to leave an answer.

ChangeLog

  • v1.1

    • Added shortcut keys
    • Fixed a bug with bold style not reselecting text in textarea
  • v1.2

Code

Languages:

  • JavaScript

Frameworks:

  • jQuery (native)
1
  • 2
    I'd vote twice if could - thanks for adding the shortcuts :) – Oleg Valter Jun 30 at 15:40
6

Thanks for the script. It's cool and helpful.

When I try to comment more than once, the style header binds twice. Can you please fix it.

Error

If it's matter:

  1. Chrome Version 91.0.4472.77 (Official Build) (64-bit)
  2. Tampermonkey v4.13
2
  • 3
    Thanks for the report. Patched in v1.2 – Spectric Jun 30 at 15:45
  • 3
    Thanks for fix :) – Shree Jun 30 at 15:49
5

Add an ability to insert images in comments inline.

This is a well-known limitation of the comment box, and there have been multiple requests for this to be added dating back to 2011. Given that the closest workaround we have for it right now is to go to an answer box, insert an image there, then copy the link, and finally paste it back into the comment box, it will be a huge time-saver.

4

The installation process is slightly cumbersome: you have to copy the text from the script, then paste it into a new GreaseMonkey script. I've made a pull request changing the suffix to .user.js to allow GreaseMonkey to auto-detect the script.

1
  • 1
    Thanks for the suggestion. I've accepted the PR. – Spectric Jun 30 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .