@yungu-fed/question-editor 0.4.5 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -75,6 +75,21 @@ structure. Public model helpers normalize `QuestionType`, `QuestionData`, and
75
75
  `QuestionResponse` at the package boundary so consumers do not need to duplicate
76
76
  element-specific defaulting logic.
77
77
 
78
+ ### Rich-text hydration
79
+
80
+ Content entry points hydrate every element's rich-text fields and every extra,
81
+ including nested questions resolved through their own templates. They read a
82
+ non-empty JSON document first, otherwise HTML, otherwise plain text. An empty
83
+ JSON array is treated as a missing document; an explicit empty paragraph remains
84
+ an intentional empty document. Input objects are not mutated. Inline blank IDs
85
+ and text-marker IDs are preserved by their codecs.
86
+
87
+ Element-specific code owns field locations and answer references; HTML/JSON
88
+ reading uses the shared document reader. New element types must be accounted for
89
+ in the exhaustive rich-text mapping. Regression tests cover all element and extra
90
+ types, media, text-only input, empty JSON arrays, nested questions, and the real
91
+ Slate answer field. This hydration does not infer blank counts or split answers.
92
+
78
93
  ## Compatibility
79
94
 
80
95
  - Runtime peer range: React `>=16.14 <20`