10

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


Languages/libraries used:

1
  • 3
    I'd vote twice if could - thanks for adding the shortcuts :)
    – 0Valt
    Commented Jun 30, 2021 at 15:40

4 Answers 4

7

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
1
  • 3
    Thanks for the report. Patched in v1.2
    – Spectric
    Commented Jun 30, 2021 at 15:45
6

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.

6

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.

0
1

Icons are not showing correctly

Icons are not showing correctly for me, on Firefox 114. Could anyone else reproduce?

1
  • 1
    Interesting. I will take a look, thank you!
    – Spectric
    Commented May 30, 2023 at 20:12

You must log in to answer this question.

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