Paint markdown table cells or rows

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Paint markdown table cells or rows

L4 Transporter

Hello,

We use markdown tables to show the analysts' incident data. We use them for manual tasks in details as in layouts. We'd like to paint those cells where the data shown is critical. For example, on a markdown table where some hashes are detonated, we'd like to paint the rows or cells where hashes are malicious.

3 REPLIES 3

L3 Networker

Hi @Josep – Background color can be added in markdown using the following syntax:

{{background:#<HEX_COLOR>}}(<TEXT>)

 

E.g. for red:

{{background:#fd0800}}(<TEXT>)

 

Alternatively, you can also use HTML for your General Purpose Dynamic Section tables.

 

For markdown, use the markdown editor on the XSOAR CLI to see what other formatting options are available.

L4 Transporter

it worked, however when it's printed it doesn't fill the cell:

 

Josep_0-1692709836717.png

 

@Josep I'd suggest using HTML instead for greater flexibility. Simple example that would work for a General Purpose Dynamic Section in the layout:

 

html = """
<table border="1x solid black">
<tr>
<th>Col 1</th>
<th>Col 2</th>
</tr>
<tr>
<td style="background-color:#FF1744">1a</td>
<td>2a</td>
</tr>
<tr>
<td style="background-color:#00CD33">1b</td>
<td>2b</td>
</tr>
</table>
"""
return_results({
'ContentsFormat': EntryFormat.HTML,
'Type': EntryType.NOTE,
'Contents': html
})
  • 5176 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!