Skip to main content
diagram

Display Modes

Rich text fields can be displayed in two modes within the Risksheet grid. The choice depends on whether you need to preserve formatting or enable editing.

Standard Text Display

When a rich text field is bound to a standard column (without the serverRender property), the content is converted to plain text by the type conversion system:
BehaviorDescription
Formatting strippedAll HTML tags are removed. Bold, italic, colors, lists, and tables are lost.
Links processedLinks embedded in the content are automatically processed for rendering, though they appear as plain text.
Text typeThe column uses the text type, which supports multi-line plain text editing.
EditablePlain text can be edited and saved back to Polarion. However, the original HTML formatting is permanently lost once saved from the grid.
Configuration example:
{
  "id": "description",
  "header": "Description",
  "binding": "description",
  "type": "text",
  "width": 300,
  "level": 1
}
Risksheet does not fully support editing rich text fields. Editing a rich text field through the grid may strip line breaks and HTML formatting from the work item XML, causing all text to appear concatenated. Use column type text (multi-line plain text) as the recommended alternative when editing capability is needed. For preserving formatting, use serverRender instead (read-only).

Server Render Display

Use the serverRender property to display rich text with full HTML formatting. Server render columns execute a Velocity expression on the server to produce the HTML output:
{
  "id": "description",
  "header": "Description",
  "serverRender": "$item.fields().get('description').render().htmlFor().forFrame()",
  "width": 300,
  "level": 1
}
BehaviorDescription
Full HTML renderingColors, bold, italic, underline, lists, tables, and other HTML formatting are preserved and rendered in the grid cell.
Clickable linksHyperlinks within the rich text remain functional and can be clicked to navigate.
Embedded imagesImages stored in rich text fields (diagrams, symbols, annotations) are displayed inline in the cell.
Read-onlyServer render columns are always read-only. Content cannot be edited through the grid.
The serverRender property produces a read-only display. There is no way to edit rich text formatting from within the Risksheet grid. Users must edit rich text content in Polarion’s native work item editor, then refresh the Risksheet to see the updated content.

Velocity Snippets for Rich Text

The serverRender property accepts Velocity expressions that are evaluated server-side. The following snippets are the standard patterns for rendering rich text fields.

Basic Rich Text Field Rendering

Use $item.fields().get('fieldID') with the .render().htmlFor().forFrame() chain:
$item.fields().get('description').render().htmlFor().forFrame()
Replace description with the actual Polarion field ID of your rich text field.

Common Field Aliases

Some standard Polarion fields have shortcut methods:
$item.fields().description().render().htmlFor().forFrame()

Custom Rich Text Fields

For custom rich text fields defined on your work item type:
$item.fields().get('customRichTextField').render().htmlFor().forFrame()
The field ID used in $item.fields().get('...') must match the Polarion custom field ID exactly. Check your project’s custom field definitions in the Polarion administration panel, or see Field Mapping for details on how Polarion fields map to Risksheet columns.

Rich Text with Images

For fields containing embedded images (such as symbol libraries, annotated diagrams, or visual risk descriptions):
{
  "id": "symbols",
  "header": "Symbols",
  "serverRender": "$item.fields().get('testRichTextFieldID').render().htmlFor().forFrame()",
  "width": 200,
  "level": 1
}
Rich text fields with images are a commonly requested feature. The serverRender approach is the recommended method for displaying images in the grid. The images render at their original size within the cell, which may cause layout issues if images are large. See the section on controlling image display below for CSS-based sizing.

Column Properties for Rich Text

Standard Text Column Properties

NameTypeDefaultDescription
idstringAuto-generatedUnique column identifier
headerstringRequiredDisplay text in column header
bindingstringSame as idPolarion field binding for the rich text field
typestringtextSet to text for multi-line editing. Auto-detected from Polarion field type if omitted.
widthnumberSee applicationColumn width in pixels
levelnumber1Hierarchical level
readOnlybooleanfalseSet to true to prevent editing (recommended for rich text fields)
headerGroupstringNoneHeader group for multi-level column grouping

Server Render Column Properties

NameTypeDefaultDescription
idstringAuto-generatedUnique column identifier
headerstringRequiredDisplay text in column header
serverRenderstringNoneVelocity expression to execute server-side. The result HTML is rendered in the cell.
widthnumberSee applicationColumn width in pixels
levelnumber1Hierarchical level
headerGroupstringNoneHeader group for multi-level column grouping
When using serverRender, the binding property is not required for the display itself — the Velocity expression retrieves the data directly. However, if the column needs to participate in sorting or filtering, a binding may still be useful.

Controlling Image Display

Images rendered through serverRender may appear at their original dimensions, which can disrupt the grid layout. Control image sizing using CSS in the top panel template or via custom styles:
ApproachDescription
CSS in Top PanelAdd CSS rules targeting img elements within server-rendered cells to limit max-width and max-height
Cell height configurationAdjust row heights in the headers configuration to accommodate image dimensions
Custom rendererUse a custom Velocity renderer that wraps images in a sized container
See the Top Panel Template reference for details on injecting custom CSS.

Autocomplete Behavior

Text columns (non-server-render) support autocomplete suggestions when editing:
PropertyDefaultDescription
settings.global.suggestTextFieldstrueEnables autocomplete for text fields based on existing values
queryFactoryNoneCustom JavaScript function to customize autocomplete suggestions
When suggestTextFields is enabled, the text editor shows suggestions based on existing values in the same column across all rows. This is useful for maintaining consistency in plain text descriptions but does not apply to server-rendered columns.

Export Behavior

Excel Export

Rich text columns export differently based on their configuration:
ConfigurationExport Behavior
Standard text columnPlain text (HTML already stripped during display). Editable values export as-is.
Server render columnHTML is stripped to plain text. Line breaks from <li> elements are preserved by inserting newlines before each closing </li> tag.

PDF Export

ConfigurationExport Behavior
Standard text columnPlain text value included in PDF cell
Server render columnHTML is stripped to produce plain text content. The emptyPlaceholder property controls display for empty cells.
The exact rendering of rich text in PDF exports depends on your custom PDF export script configuration. Complex HTML content (tables within tables, deeply nested lists) may not render as expected in the plain text conversion.

Known Limitations

LimitationDescriptionWorkaround
No rich text editing in gridEditing rich text through standard columns strips all HTML formattingUse serverRender for display; edit in Polarion’s work item editor
Line breaks lost on editEditing rich text fields may strip line breaks from the work item XMLUse type: "text" (multi-line text) instead of binding directly to rich text fields
Server render is read-onlyNo way to edit server-rendered content from the gridEdit in Polarion, then refresh Risksheet
Image sizingImages render at original size in cellsApply CSS rules in the top panel template to constrain dimensions
Custom Excel templatesCustom Excel export templates for rich text formatting are not availableUse PDF export with custom scripts for formatted output

Complete Example

An FMEA configuration with a mix of editable plain text and read-only rich text columns:
{
  "columns": [
    {
      "id": "title",
      "header": "Failure Mode",
      "binding": "title",
      "type": "text",
      "width": 200,
      "level": 1
    },
    {
      "id": "descriptionFormatted",
      "header": "Description (Formatted)",
      "serverRender": "$item.fields().get('description').render().htmlFor().forFrame()",
      "width": 350,
      "level": 1,
      "headerGroup": "Details"
    },
    {
      "id": "descriptionPlain",
      "header": "Description (Editable)",
      "binding": "description",
      "type": "text",
      "width": 250,
      "level": 1,
      "readOnly": false,
      "headerGroup": "Details"
    },
    {
      "id": "sev",
      "header": "Severity",
      "binding": "sev",
      "type": "rating",
      "width": 70,
      "level": 1,
      "headerGroup": "Assessment"
    },
    {
      "id": "taskNotes",
      "header": "Mitigation Notes",
      "serverRender": "$item.fields().get('notes').render().htmlFor().forFrame()",
      "width": 300,
      "headerGroup": "Mitigation"
    },
    {
      "id": "taskDescription",
      "header": "Task Details (Editable)",
      "binding": "task.description",
      "type": "text",
      "width": 250,
      "headerGroup": "Mitigation"
    }
  ]
}
This configuration provides:
  • A formatted, read-only view of the description field with full HTML rendering
  • A parallel editable plain text version for quick edits (loses formatting)
  • Server-rendered mitigation notes with preserved formatting
  • An editable task description for downstream items
KB ArticlesSupport TicketsSource Code
  • GetSetUtil.java
  • risksheet.json
  • SheetConstants.ts
  • CellEditorFormatter.ts
  • ExportToExcel.ts