Rich Text Field Types
Polarion supports rich text in Text-type custom fields:
Field Type Storage Editing Display Text (Rich Text) HTML/XML WYSIWYG in Polarion Full formatting Text (Plain) Plain text Text-only No formatting Description Rich text Full formatting Full formatting Comments Rich text Full formatting Full formatting
Display Options
RICHSHEET provides three approaches to display rich text fields, each with different capabilities:
Use Case Recommended Approach Simple text view (plain, no formatting) Use text type with column bindings Read-only rich display (keep HTML) Use serverRender with bindings Full HTML with images Use serverRender with $item binding Edit in grid (not recommended) Limitation — see notes below
Configuration: Text Column Type
The simplest approach converts rich text to plain text for grid display.
Basic Text Column Configuration
Name Type Default Description headerstring Required Column header text bindingstring Required Polarion field reference (e.g., description, customFields/detailedAnalysis) typestring textData type for conversion and display widthnumber auto Column width in pixels readOnlyboolean false Allow editing (converts back to rich text) multiLineboolean true Allow multiple lines in editor wordWrapboolean true Enable text wrapping
Example: Basic Rich Text as Plain Text
{
"header" : "Analysis Notes" ,
"binding" : "analysisNotes" ,
"type" : "text" ,
"width" : 300 ,
"multiLine" : true ,
"wordWrap" : true
}
This column displays the rich text field with all HTML formatting stripped, showing plain text only.
Configuration: ServerRender Display
ServerRender preserves rich text formatting (HTML) for read-only display. This is the recommended approach for viewing rich text with full formatting, including links and images.
ServerRender Properties
Name Type Default Description headerstring Required Column header text bindingstring Required Primary field reference typestring textAutomatically set to text when serverRender is used serverRenderstring Required Velocity script for rendering content readOnlyboolean true Always read-only (automatic) bindingsobject - Additional field mappings for template context widthnumber auto Column width in pixels
Example 1: Simple Rich Text Rendering
{
"header" : "Requirements" ,
"binding" : "requirements" ,
"serverRender" : "$item.render().htmlFor($binding).forFrame()" ,
"width" : 400
}
This configuration:
Uses Polarion’s native render() API to convert rich text to HTML
Applies htmlFor() to the binding field
Wraps with forFrame() for safe embedding
Result is read-only in the grid
Example 2: Rich Text with Context Bindings
{
"header" : "Mitigation Details" ,
"binding" : "task" ,
"serverRender" : "$task.render().htmlFor('description').forFrame()" ,
"bindings" : {
"task" : "linkedTask"
},
"width" : 400
}
This displays the description field from a linked task item using serverRender.
Rendering Rich Text with Images
A critical limitation of serverRender: images in rich text only render when using $item binding (not task-specific bindings).
Correct: Images Render
{
"header" : "Diagram" ,
"binding" : "$item" ,
"serverRender" : "$item.render().htmlFor('diagram').forFrame()"
}
Incorrect: Images Do Not Render
{
"header" : "Diagram" ,
"binding" : "diagram" ,
"serverRender" : "$binding.render().htmlFor('diagram').forFrame()"
}
When configuring serverRender for rich text fields with images, use the explicit $item reference instead of $binding in the template. Otherwise, images embedded in the rich text will not display in the grid.
Editing Rich Text Fields
Limitations
Nextedy RISKSHEET has incomplete support for editing rich text fields . Known issues:
Issue Symptom Workaround Formatting loss Line breaks lost when editing Use plain text columns instead HTML corruption Formatting corrupted after edit Set column to read-only Limited WYSIWYG No rich editor in grid Use serverRender (read-only)
Editing rich text fields directly in RISKSHEET columns may cause formatting loss, including line breaks and special characters. This is a documented product limitation. For risk management workflows, use read-only serverRender display and edit rich text fields directly in Polarion.
Editable Rich Text (Not Recommended)
If you must allow editing of rich text fields in the grid, follow this pattern:
{
"header" : "Notes" ,
"binding" : "notes" ,
"type" : "text" ,
"readOnly" : false ,
"multiLine" : true ,
"width" : 300
}
Important: This will strip all HTML formatting and convert to plain text. Formatting is lost during edit and save. This is not recommended for rich text data.
Custom Image Selector Pattern
For workflows requiring image selection (e.g., symbol/icon selection in HARA), use enum-based work item linking with Velocity styling instead of direct rich text editing.
Implementation Pattern
{
"header" : "Risk Symbol" ,
"binding" : "riskSymbol" ,
"type" : "enum:symbol_enum_id" ,
"dataTypes" : {
"symbol" : {
"type" : "Symbol" ,
"role" : "symbol_link_role"
}
}
}
Then in Velocity template (Top Panel):
#set($symbols = $item.symbols)
#foreach($symbol in $symbols)
#set($html = $symbol.render().htmlFor('image').forFrame())
<div style="width: 50px; height: 50px; display: inline-block;">$html</div>
#end
This approach:
Uses clean enum-based selection in the grid
Renders images via Velocity script
Provides better UX than attempting to edit rich text directly
Images display with controllable CSS sizing
ServerRender Context Variables
When using serverRender for rich text, these variables are available in the Velocity context:
Variable Type Description $itemWorkItem The current risk item $bindingObject The field value specified in binding $fieldField The Polarion field definition $contextMap Additional context variables
Example: Conditional Rich Text Display
{
"header" : "Conditional Content" ,
"binding" : "content" ,
"serverRender" : "#if($item.status == 'approved')$item.render().htmlFor('approvedContent').forFrame()#else<em>Pending approval</em>#end"
}
Comparing Text vs Rich Text Approaches
Aspect Text Type ServerRender Notes Formatting displayed No Yes serverRender preserves HTML Images displayed No Yes (with $item binding) Images in rich text require correct binding Editable in grid Yes No Text type allows editing, loses formatting Read-only Optional Always serverRender is always read-only Configuration complexity Simple Medium serverRender requires Velocity knowledge Browser compatibility All All Both work across browsers
Field Mapping Examples
Example 1: Risk Description
{
"header" : "Description" ,
"binding" : "customFields/riskDescription" ,
"type" : "text" ,
"multiLine" : true ,
"width" : 400 ,
"readOnly" : true
}
Example 2: Mitigation with Images
{
"header" : "Mitigation Plan" ,
"binding" : "$item" ,
"serverRender" : "$item.render().htmlFor('mitigationPlan').forFrame()" ,
"width" : 500
}
Example 3: Linked Item Description
{
"header" : "Task Description" ,
"binding" : "linkedTask" ,
"serverRender" : "$linkedTask.render().htmlFor('description').forFrame()" ,
"bindings" : {
"linkedTask" : "mitigationTask"
},
"width" : 450
}
Troubleshooting Rich Text Display
Images Not Showing
Problem: Rich text field contains images but they don’t appear in the grid.
Solution: Check serverRender binding:
✅ Correct: $item.render().htmlFor('field').forFrame()
❌ Incorrect: $binding.render().htmlFor('field').forFrame()
Problem: HTML content shows as raw tags or partially rendered.
Solution: Ensure forFrame() is called:
$item.render().htmlFor('field').forFrame() # ✅ Correct
$item.render().htmlFor('field') # ❌ Missing forFrame()
Changes Lost After Edit
Problem: Editing rich text in grid causes formatting loss.
Solution: Use serverRender (read-only) for viewing, edit in Polarion for full WYSIWYG support.
Related Pages
KB Articles Support Tickets Source Code
GetSetUtil.java
risksheet.json
SheetConstants.ts
CellEditorFormatter.ts
ExportToExcel.ts