Allow shortcuts to remove markdown
Implementation Guide
We want to be able to toggle the bold, italic, strikethrough, and inline code formatting when using the plain text editor toolbar buttons. I do not include blockquote in this as blockquotes can be increased in their indentation level.
There are two ways to view this. One is selecting the text, including the formatting characters. Detect if the we're adding the same formatting as what is already applied, and remove it if so.
The other is selecting only the text, without the formatting characters.
We will choose the first option, selecting the text and the formatting characters. For example, we would select **this is bold**, and if we're using the bold shortcut, we would remove the bold characters.
It might be possible handle both situations - check for formatting characters inside the selection, and then check outside the selection. Might be confusing?
I believe this is handled in https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/lib/utils/text_markdown.js#L259-L259. For reference, the toolbar/shortcut is added in https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/lib/utils/text_markdown.js#L259-L259
Tests should be placed in https://gitlab.com/gitlab-org/gitlab/blob/master/spec/frontend/lib/utils/text_markdown_spec.js
Problem to solve
When I am creating/editing a comment or description, I want to be able to click on a shortcut to remove markdown formatting if it has already been applied, so that I do not have to manually delete the additional markdown.
