HTML format on fields
Asked by Fran Moya:

I am trying to create an alert with HTML formatting (in the docs say I can do that) into the description field. The problem is I dont get the correct formatting with a simple \<ul\> and \<li\> tags. Am I missing something?

e.g.:

\<html\>  
\<body\>  
\<ul\>  
\<li\>Text1\</li\>  
\<ul\>  
\<li\>Text2\</li\>  
\<ul\>  
\<li\>Text3\</li\>  
\<li\>Text4\</li\>  
\</ul\>  
\</ul\>  
\</ul\>  
\</body\>  
\</html\>

This dont show anything, only the Texts in new lines. Thanks for the help!!


Answers:
author: Allen Barnard
body: Hi [@Fran Moya](/t5/user/viewprofilepage/user-id/4581340)

The unsorted list is rendered without bullet points, the list items are however rendered as indented text. Also note that whenever you end a line with a "close element" statement (\</p\>, \</ul\>, \</li\>......) it creates a blank line, also note that lines containing only HTML elements also render as a blank line, it is best to include all elements and data relating to a list in a single line, please see the below example:

```
<html>
<p>This is regular text</p>
<ul><li>indented list item1</li><li>indented list item2</li><li>indented list item3</li></ul>
</html>
```

This is expected to render like this:

```
This is regular text

 indented list item1
 indented list item2
 indented list item3


```

<br />

I hope this answers the question :)

comments: author: igorkop
body: [@Allen Barnard](/t5/user/viewprofilepage/user-id/3427420) I have a similar question. I tried to create an alert via an API request with the description field with this text (minified):

```
<html>
<body>
<table cellspacing="0" cellpadding="0" border="0" bgcolor="#000000">
  <tr>
    <td>
      <table cellspacing="3" border="0">
        <tr bgcolor="#ffffff">
          <th>field1</th>
          <th>field2</th>
          <th>field3</th>
        </tr>
        <tr bgcolor="#ffffff">
          <td>data1</td>
          <td>data2</td>
          <td>data3</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
```

but in the alert it looks completely different. It transforms to:

```

<table cellspacing="0" cellpadding="0" border="0" bgcolor="#000000">
  <tbody>
    <tr>
      <td>
        <table cellspacing="3" border="0">
          <tbody>
            <tr bgcolor="#ffffff">
              <th>field1</th>
              <th>field2</th>
              <th>field3</th>
            </tr>
            <tr bgcolor="#ffffff">
              <td>data1</td>
              <td>data2</td>
              <td>data3</td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
  </tbody>
</table>
```

On top of that, there is no table formatting at all. However [the official doc](https://support.atlassian.com/opsgenie/docs/alert-fields/) says that the field supports HTML formatting.


author: Shashwat Khare
body: Hello [@igorkop](/t5/user/viewprofilepage/user-id/5258614) ,  

Yes, the description field supports HTML formatting, however, the Table formatting in the field is not yet supported and we have an existing Feature Request for this listed below:  

<https://jira.atlassian.com/browse/OPSGENIE-1551>  

I have gone ahead \& added you to this feature request.  

I have personally upvoted and watched the FR so I help gain more traction on its implementation and also so I receive notifications on it moving forward.  

I would recommend that you do the same so that you help add more traction to its implementation and so you receive updates in the future as well.  

Best,  
Shashwat


Tags: cloud