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 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
Custom Styles for Rich-Text Fields
You can assign rich-text fields to a custom style that already exists in your template.
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.
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:
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.
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.
image_figure: none - will not display the figure.
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:
Last updated