# Template - Styles

> UPDATED: Please head over to our new GitHub Support Site for help, examples, tips and tricks: <https://github.com/AttackForge/ReportGen>

You can also set default styles in your template which will apply when report is generated.&#x20;

![](/files/53GQyqgJU2qYDI3DkU4I)

* **AF Heading 1**
  * Style for WYSIWYG editor Heading 1
* **AF Heading 2**
  * Style for WYSIWYG editor Heading 2
* **AF Heading 3**
  * Style for WYSIWYG editor Heading 3
* **AF Code Snippet**
  * Style for WYSIWYG editor PRE
* **AF Inline Code**
  * Style for WYSIWYG editor Code
* **AF List**
  * Style for WYSIWYG editor lists (ordered and unordered)
* **AF Images**
  * Style for images and their captions
* **AF Normal**
  * Style for paragraph text
* **AF BlockQuote**
  * Style for blockquotes

## Custom Styles for Rich-Text Fields

You can assign rich-text fields to a custom style that already exists in your template.

{% code overflow="wrap" %}

```
{@proof_of_concept_styled("normal_style":"VulnerabilityNormal", "list_style":"VulnerabilityList")}
```

{% endcode %}

The following style references are supported:

* **normal\_style** - applies to normal body text
* **list\_style** - applies to lists
* **code\_snippet\_style** - applies to code snippets
* **inline\_code\_snippet\_style** - applies to inline code snippets. Must reference a [Character Style](#microsoft-word-character-styles).
* **heading\_1\_style** - applies to heading 1
* **heading\_2\_style** - applies to heading 2
* **heading\_3\_style** - applies to heading 3
* **image\_style** - applies to images and their captions
* **image\_display\_style** - applies to the images only. Must reference a [Character Style](#microsoft-word-character-styles).
* **image\_description\_style** - applies to the image descriptions/captions only. Must reference a [Character Style](#microsoft-word-character-styles).
* **hyperlink\_style** - applies to hyperlinks. Must reference a [Character Style](#microsoft-word-character-styles).
* **blockquote\_style** - applies to blockquotes

Start by creating the custom style in your template - **do not** include any whitespace in the style name.

<figure><img src="/files/JE6lRoV4ODsI9yE0srYe" alt=""><figcaption></figcaption></figure>

Update your tag options to reference the custom style:

<figure><img src="/files/1IVu1zB9cbJIE8tBBRYM" alt=""><figcaption></figcaption></figure>

When the report is generated, the style will be automatically referenced:

<figure><img src="/files/EQPlmIDSfspMOmHCOXCp" alt=""><figcaption></figcaption></figure>

## Toggle Image Description (Filename/Caption)

This option can be used to adjust how the filename or caption is displayed under an image. This option can be set against any {@...\_styled} tags where ... is the name of a tag.&#x20;

```
{@..._styled(“image_description”:“caption”)}
{@..._styled(“image_description”:“prefer-caption”)}
{@..._styled(“image_description”:“filename”)}
{@..._styled(“image_description”:“none”)}
```

* **image\_description: caption** - will display the caption if it exists, otherwise will display nothing.
* **image\_description: prefer-caption** - will display the caption if it exists, otherwise will display filename.
* **image\_description: filename** - will display the filename.
* **image\_description: none** - will display no caption or filename.

## Toggle Image Figure

This option can be used to disable the figure under an image. This option can be set against any {@...\_styled} tags where ... is the name of a tag.&#x20;

```
{@..._styled(“image_figure”:“none”)}
```

* **image\_figure: none** - will not display the figure.

## Table Styling

These option can be used to style rich-text tables. These options can be set against any {@...\_styled} tags where ... is the name of a tag.&#x20;

{% code overflow="wrap" %}

```
{@..._styled(“table_alignment”:”center”,”table_columns_width”:”5000”,”table_rows_split_across_pages”:”true”,”table_borders_thickness”:”30”,”table_borders_color”:”ff5733”,”table_cells_margin_top”:”1”,”table_cells_margin_bottom”:”1”,”table_cells_margin_left”:”1”,”table_cells_margin_right”:”1”,”table_cells_borders_thickness”:”10”,”table_cells_borders_color”:”6c3483”,”table_rows_header_style”:”CustomTableHeader”,”table_rows_header_background_color”:”00B050”,”table_rows_header_height”:”600”,”table_rows_header_vertical_alignment”:”center”,”table_rows_header_horizontal_alignment”:”center”,”table_rows_body_style”:”CustomTableBody”,”table_rows_body_vertical_alignment”:”center”,”table_rows_body_horizontal_alignment”:”center”,”table_rows_body_background_color”:”c7fcc5”,”table_rows_body_height”:”1000”)}
```

{% endcode %}

* **table\_alignment** - left/center/right
* **table\_columns\_width** - pixels e.g. 5000
* **table\_rows\_split\_across\_pages** - true/false
* **table\_borders\_thickness** - pixels e.g. 30
* **table\_borders\_color** - hex color code e.g. 000000
* **table\_cells\_margin\_top** - pixels e.g. 1
* **table\_cells\_margin\_bottom** - pixels e.g. 1
* **table\_cells\_margin\_left** - pixels e.g. 1
* **table\_cells\_margin\_right** - pixels e.g. 1
* **table\_cells\_borders\_thickness** - pixels e.g. 10
* **table\_cells\_borders\_color** - hex color code e.g. 000000
* **table\_rows\_header\_style** - maps to a Word style (don't put whitespace in the style name)
* **table\_rows\_header\_background\_color** - hex color code e.g. 000000
* **table\_rows\_header\_height** - pixels e.g. 600
* **table\_rows\_header\_vertical\_alignment** - top/center/bottom
* **table\_rows\_header\_horizontal\_alignment** - left/center/right
* **table\_rows\_body\_style** - maps to a Word style (don't put whitespace in the style name)
* **table\_rows\_body\_vertical\_alignment** - top/center/bottom
* **table\_rows\_body\_horizontal\_alignment** - left/center/right
* **table\_rows\_body\_background\_color** - hex color code e.g. 000000
* **table\_rows\_body\_height** - pixels e.g. 1000

## Microsoft Word Character Styles

Character styles are used to apply to sections within a paragraph.

The following custom styles only support Character styles:

* **image\_display\_style** - applies to the images only.
* **image\_description\_style** - applies to the image descriptions/captions only.
* **hyperlink\_style** - applies to hyperlinks.

To create a Character style in Microsoft Word, start by creating the custom style in your template - **do not** include any whitespace in the style name.

***IMPORTANT! Make sure you select 'Character' for the Style type. If you select any other option - it will not work.***

<figure><img src="/files/00P4FcpEAtvPesB11MhH" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qlHqVm8f6RDuP1A1iH2m" alt=""><figcaption></figcaption></figure>

The example above, combined with the code snippet below, will produce the following:

```
{#vulnerabilities}
{#affected_assets}
{@proof_of_concept_styled(“image_display_style”:”BoxedImage”,“image_description”:“caption”) | resize:[“300”]}
{/}{/}
```

<figure><img src="/files/T3mBzsyN5YpIVFeqR87f" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.attackforge.com/attackforge-enterprise/modules/reporting/template-styles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
