Skip to main content

Display Rich Text Fields (Read-Only)

Use the serverRender property with Polarion’s rendering API to display rich text content including text, formatting, and images:
{
  "headerGroup": "Details",
  "headerGroupCss": "headDetails",
  "headerCss": "headDetails",
  "header": "Description",
  "bindings": "task.$item",
  "serverRender": "#set($doc = $item.getOldApi())$doc.description.render().htmlFor().forFrame()",
  "width": 300,
  "readOnly": true,
  "level": 2,
  "id": "taskDescription"
}
Key Configuration Requirements:
PropertyValuePurpose
bindingstask.$itemReferences the entire linked work item object
serverRenderVelocity scriptExecutes server-side rendering of rich text content
readOnlytrueRich text fields displayed via serverRender are always read-only
Images in rich text fields only render when bindings is set to task.$item (or risk.$item for risk items). Setting bindings to specific field names like task.description will not render images correctly.

Rendering API Methods

Velocity Rendering Chain: diagram This chain ensures rich text fields render with:
  • Formatted text (bold, italic, lists)
  • Embedded images with proper dimensions
  • Clickable hyperlinks
  • Tables and structured content
Replace .description with any Polarion rich text field name (e.g., .customRichTextField, .resolution, .comments). The rendering API works for all Polarion Text-type fields.

Understanding Read-Only Limitation

RICKSHEET has limited support for editing rich text fields directly in the grid: Limitation: When you edit rich text field content in RISKSHEET:
  • Line breaks may be lost
  • Formatting may be stripped
  • Images may disappear
  • Content becomes “bunched up”
Workaround:
  1. Open the work item in Polarion’s native editor by clicking the row header
  2. Edit the rich text field using Polarion’s rich text editor
  3. Save the work item
  4. Refresh the RISKSHEET to see updated content
Do not configure rich text columns as editable (readOnly: false). This causes formatting loss and content corruption. Always keep rich text columns as readOnly: true and edit through Polarion’s native interface.

Alternative: Custom Image Selectors

For a better user experience with images, use enum-based work item linking with Velocity script styling instead of direct rich text editing:
{
  "headerGroup": "Visual Elements",
  "headerGroupCss": "headVisual",
  "headerCss": "headVisual",
  "header": "Symbol",
  "bindings": "symbolLink",
  "type": "multiEnum:@NoIDWorkItems",
  "serverRender": "#foreach($link in $item.getLinkedWorkItems('symbolLink'))#set($doc = $link.getOldApi())<img src='$doc.icon.render().htmlFor()' style='max-width:50px;max-height:50px;'/>#{end}",
  "width": 120,
  "level": 1,
  "id": "symbol"
}
Benefits of Enum-Based Image Selection:
  • Clean dropdown selection interface
  • Controlled image dimensions via CSS styling
  • Multi-select support for multiple images
  • No formatting loss issues
Workflow: diagram

Display Plain Text from Rich Text Fields

To strip formatting and display only plain text content, omit the serverRender property and use column type: "text":
{
  "header": "Description (Plain)",
  "bindings": "description",
  "type": "text",
  "width": 250,
  "readOnly": false,
  "id": "descPlain"
}
RICKSHEET automatically converts rich text fields to plain text for grid display. Links in content are automatically processed for proper rendering.
Use plain text columns when you need searchable, filterable content. Use serverRender with the rendering API when visual formatting and images are essential for understanding the content.

Verification

After configuring rich text columns, you should now see: Formatted text with proper styling (bold, italic, lists)
Embedded images displaying at correct dimensions
Clickable links to other work items or external URLs
Read-only cells that cannot be edited directly in the grid
To edit rich text content, click the row header to open the work item in Polarion’s native editor.

See Also

KB ArticlesSupport TicketsSource Code
  • CellEditorFormatter.ts
  • GetSetUtil.java
  • risksheet.json
  • PolarionAppConfigManager.java
  • AppConfig.ts