Decorators - mattias-skold/EnhancedExportDocumentation GitHub Wiki
Decorators brings a way to modify the generated document post generation. Decorators looks for specific html elements with specified attributes and either sets the style or modify the content of the selected html elements.
An example: The Work item link decorator turns
<div class="System.Title">1</div>
Into
<div class="System.Title"><a href="[yourProjectUrl]/_workitems?_a=edit&id=1">1</a></div>
A decorator contains of three main parts
- Target specifier
- Modifiers/Rules
- Properties
The target specifier is a jQuery selector to find all places to alter/modify.
To find all tags with the class System.Title - you need to escape the dot in System.Title with a . like System.Title
Modifiers/Rules can be conditional - Modifiers/Rules can be of 2 kinds
- CSS - Sets the style of the selected element
- Content - sets /replaces the content of the selected element
Properties is a way to make the decorator easier to use by extracting key settings into properties, instead of having it "hard coded" in the decorator rules. The end user can change the values of the properties at runtime.