Case Comment Formatting (Markdown)

Updated -

Summary

  • Basic text formatting (such as bold, italics, unordered lists/bullets, H1 and H2) is displayed in a menubar when composing a comment in Portal case management .Plaintext comments will still be supported.
  • Preview function is available to view before it is produced in its final form.
  • Auto link function is available for Case numbers and Bugzillas.
    This is accomplished through the marked.js markdown library. See the documentation [1], demo[2], and github[3] page for your reference.
  • Additional formatting is supported by typing the appropriate markdown syntax. Some common examples are listed in the section Some Common Syntax Examples . Marked.js supports CommonMark [4]. These links are for the corresponding specs and provide additional details on how to utilize their syntax.

Details

Users composing case comments will be able to take advantage of basic formatting such as:

  • Bold
  • Italics
  • Unordered lists (bullets)
  • H1 and H2

In Portal case management, these formatting options will be available through a menubar when composing a case comment. Plaintext comments are still supported. Comments and historical comments will be in plaintext format.

To accommodate this feature, we’re using a markdown library called marked.js. Documentation for marked.js is available here [1]. An interactive demo page is available here [2], and the GitHub page is here [3].

In addition to the “markdown” toolbar functionality in the case comment pane, more advanced markdown can be applied by including the appropriate syntax (or “markdown language”). Marked.js supports the CommonMark [4] and GitHub [5] markdown syntax . These links are to their respective specification docs, which outline further details on how to utilize their markdown syntax.

Some Common Syntax Examples :

Bold

**This is bold**

Italics

_This is Italics_

Ordered Lists

1. This
2. Is
3. An
4. Ordered
5. List

Unordered Lists

- This
- Is
- An
- Unordered 
- List

H1, H2, H3 etc.

# This is h1 text
## This is h2 text
### This is h3 text 

Backtick Code

`10 print “HELLO”`
`20 GOTO 10`

Multiline Code

~~~
10 PRINT "HELLO"
20 GOTO 10
~~~

Similarly, multiline code can use triple backticks instead of ~. For example:

```
10 PRINT “HELLO”
20 GOTO 10
```

URL

[Text to turn into a link](URL of page you want to link to)
For example:
[What is an sosreport and how to create one in Red Hat Enterprise Linux?](https://access.redhat.com/solutions/3592)

References

[1] marked.js documentation - https://markedjs.org
[2] marked.js demo - https://marked.js.org/demo/
[3] marked.js GitHub - https://github.com/markedjs/marked
[4] CommonMark - https://spec.commonmark.org/
[5] GitHub Markdown - https://github.github.com/gfm/

Comments