Skip to content

Feature Request: Advanced Rich Text Field using kerebron #152

@lattln

Description

@lattln

Summary

Introduce a new Advanced Rich Text field type to the Questionnaire Builder using the kerebron package. This field will allow authors to create, edit, and render rich text content (formatted text, lists, links, etc.) directly within questionnaires.


Motivation / Problem Statement

Currently, Questionnaire Builder lacks a first-class rich text field for structured and formatted content beyond basic text inputs. This limits form expressiveness for use cases such as:

  • Instructions and explanatory sections
  • Clinical notes or narrative responses
  • Styled consent or informational blocks

The kerebron package already provides rich text editing and rendering capabilities aligned with MIE tooling and standards. Integrating it as an advanced field will create consistency and unlock richer questionnaire authoring.


Proposed Solution

Create a new Advanced Field Type (e.g., richText or advancedRichText) backed by kerebron.

The field should:

  • Use kerebron as the editor in the Editor/Form Builder
  • Persist content in a serializable format (e.g., JSON / AST as defined by kerebron)
  • Render read-only output via kerebron in Renderer
  • Be schema-compatible with existing questionnaire definitions

Scope / Requirements

Editor (Authoring)

  • New field option available in the field palette

  • Uses kerebron editor component

  • Supports:

    • Bold / italic / underline
    • Headings
    • Lists
    • Links
    • Inline formatting
  • Integrates with existing field configuration patterns

Schema / Data

  • Define a new field type
  • Store editor output in a stable, versioned structure
  • Validate schema compatibility with existing forms

Renderer (Runtime)

  • Render rich text using kerebron renderer
  • Read-only by default (unless explicitly enabled)
  • Consistent styling with Questionnaire Builder themes / prefixes

Compatibility

  • No breaking changes to existing forms
  • Graceful handling if kerebron content is missing or malformed

Out of Scope (for this ticket)

  • Collaborative editing
  • HTML import/export
  • Custom plugins beyond core kerebron features

Acceptance Criteria

  • New advanced rich text field can be added in the form builder
  • Field uses kerebron editor for authoring
  • Field content persists correctly in questionnaire schema
  • Field renders correctly in questionnaire runtime
  • Styling respects existing theming / prefixing conventions
  • No regression in existing field behavior

Technical Notes / References


Priority

Medium / High — enables richer clinical and instructional form content.


Suggested Labels

feature
enhancement
advanced-field
editor
renderer

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2NormalSize: LMulti-component feature or significant refactor. ~6–12 files, possible data/type shape updates.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions