Skip to main content

Rich Text Field Types

Polarion supports rich text in Text-type custom fields:
Field TypeStorageEditingDisplay
Text (Rich Text)HTML/XMLWYSIWYG in PolarionFull formatting
Text (Plain)Plain textText-onlyNo formatting
DescriptionRich textFull formattingFull formatting
CommentsRich textFull formattingFull formatting

Display Options

RICHSHEET provides three approaches to display rich text fields, each with different capabilities:
Use CaseRecommended 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 imagesUse 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

NameTypeDefaultDescription
headerstringRequiredColumn header text
bindingstringRequiredPolarion field reference (e.g., description, customFields/detailedAnalysis)
typestringtextData type for conversion and display
widthnumberautoColumn width in pixels
readOnlybooleanfalseAllow editing (converts back to rich text)
multiLinebooleantrueAllow multiple lines in editor
wordWrapbooleantrueEnable 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

NameTypeDefaultDescription
headerstringRequiredColumn header text
bindingstringRequiredPrimary field reference
typestringtextAutomatically set to text when serverRender is used
serverRenderstringRequiredVelocity script for rendering content
readOnlybooleantrueAlways read-only (automatic)
bindingsobject-Additional field mappings for template context
widthnumberautoColumn 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:
IssueSymptomWorkaround
Formatting lossLine breaks lost when editingUse plain text columns instead
HTML corruptionFormatting corrupted after editSet column to read-only
Limited WYSIWYGNo rich editor in gridUse 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.
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:
VariableTypeDescription
$itemWorkItemThe current risk item
$bindingObjectThe field value specified in binding
$fieldFieldThe Polarion field definition
$contextMapAdditional 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

AspectText TypeServerRenderNotes
Formatting displayedNoYesserverRender preserves HTML
Images displayedNoYes (with $item binding)Images in rich text require correct binding
Editable in gridYesNoText type allows editing, loses formatting
Read-onlyOptionalAlwaysserverRender is always read-only
Configuration complexitySimpleMediumserverRender requires Velocity knowledge
Browser compatibilityAllAllBoth 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()

Formatting Looks Broken

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.
KB ArticlesSupport TicketsSource Code
  • GetSetUtil.java
  • risksheet.json
  • SheetConstants.ts
  • CellEditorFormatter.ts
  • ExportToExcel.ts