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.

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 List

Style for WYSIWYG editor lists

AF Images

Style for images and their captions

AF Normal

Style for paragraph text

Custom Styles for Rich-Text Fields

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

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

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

  • 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.

  • image_description_style - applies to the image descriptions/captions only. Must reference a Character Style.

  • hyperlink_style - applies to hyperlinks. Must reference a Character Style.

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

Update your tag options to reference the custom style:

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

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.

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”]}
{/}{/}

Last updated

Check YouTube for more tutorials: https://youtube.com/@attackforge