-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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
kerebronas 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
kerebronin Renderer - Be schema-compatible with existing questionnaire definitions
Scope / Requirements
Editor (Authoring)
-
New field option available in the field palette
-
Uses
kerebroneditor 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
kerebronrenderer - Read-only by default (unless explicitly enabled)
- Consistent styling with Questionnaire Builder themes / prefixes
Compatibility
- No breaking changes to existing forms
- Graceful handling if
kerebroncontent is missing or malformed
Out of Scope (for this ticket)
- Collaborative editing
- HTML import/export
- Custom plugins beyond core
kerebronfeatures
Acceptance Criteria
- New advanced rich text field can be added in the form builder
- Field uses
kerebroneditor 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
kerebronrepository: https://github.com/mieweb/kerebron- Questionnaire Builder repo: https://github.com/mieweb/questionnaire-builder
- Consider reusable abstraction for future advanced fields
Priority
Medium / High — enables richer clinical and instructional form content.
Suggested Labels
feature
enhancement
advanced-field
editor
renderer