<!-- thumbnail: https://user-images.githubusercontent.com/79671525/123726685-681a1f80-d85e-11eb-9802-90a114d7c4f1.png -->
<!-- version: 1.2 -->
<!-- tag: comment-assist-spectric -->
<!-- excerpt: A tool that makes writing comments easier by introducing the toolbar found in the answers form over to the comments form -->

## Screenshot / Code Snippet

![CommentAssist Demonstration - Spectric](https://user-images.githubusercontent.com/79671525/123724196-e7f1bb00-d859-11eb-8325-52ee414670d2.PNG)

In action:

![CommentAssist-DemoGIF-SpectricSO](https://user-images.githubusercontent.com/79671525/123726049-3fddf100-d85d-11eb-99f3-abfbbb6e9cb3.gif)
<sup>[Not loading?](https://user-images.githubusercontent.com/79671525/123726049-3fddf100-d85d-11eb-99f3-abfbbb6e9cb3.gif)</sup>

## 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](https://stackoverflow.design/). <sup>Does not use deprecated grid</sup> 

## 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](https://github.com/SpectricSO/stack-scripts/blob/main/LICENSE)

### Download

[Version 1.2](https://github.com/SpectricSO/stack-scripts/tree/main/scripts/CommentAssist/v1.2)

[ [Minified](https://github.com/SpectricSO/stack-scripts/blob/main/scripts/CommentAssist/v1.2/script.min.js) | [Unminified](https://github.com/SpectricSO/stack-scripts/blob/main/scripts/CommentAssist/v1.2/script.js) ]

### Platform

### Browser Support

<sub>Script is deemed supported if core functionality works</sub>

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

## Contact

Author: Spectric. [Stack Overflow](https://stackoverflow.com/users/14251221/spectric), [Github](https://github.com/SpectricSO)

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
  - Fixed [duplicate toolbar bug](https://stackapps.com/a/8991/76056)
## Code

Languages:

- JavaScript

Frameworks:

- jQuery (native)