Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

spec(AST-061): RichText is a form-field editor whose value is Lexical editor state (#7557)

Cindy Zhang8c906fda81b4
diff --git a/docs/families/input-fields.md b/docs/families/input-fields.md
index 40101092b0..68e7667c6c 100644
--- a/docs/families/input-fields.md
+++ b/docs/families/input-fields.md
@@ -77,7 +77,8 @@ form value through a labeled field surface with a content lane. Members use
models without this content/end-lane geometry. PowerSearch and ChatComposer
are higher-level compositions that consume member behavior rather than define
another field primitive. BaseTypeahead is a combobox engine without a field
- surface.
+ surface. RichTextEditor is a canary package and stays outside this family
+ until a family adoption is recorded.
FR10 and DEC-7 also bind CheckboxList, RadioList, and Slider. They stay
outside this family's geometry rules, but they compose Field, and every
diff --git a/docs/specs/AST-061-document-surface-parity/spec.md b/docs/specs/AST-061-document-surface-parity/spec.md
index e8bfee832d..766cbfe221 100644
--- a/docs/specs/AST-061-document-surface-parity/spec.md
+++ b/docs/specs/AST-061-document-surface-parity/spec.md
@@ -39,9 +39,9 @@ reflows no line; only editing affordances appear or disappear.
The one exception is the character reference decoder that DEC-5 shares.
- Collaboration, persistence, document hosting, and plugin adapters between
Markdown plugins and the editor.
-- Which editor engine serves document editing, and the stored value an editor
- reads and writes. This record governs how the surfaces render the same
- document, not which surface a product chooses to edit documents with.
+- Which editor engine a product chooses for editing whole documents, and the
+ value that product stores. This record governs how the surfaces render the
+ same document; RichText's own role and value are DEC-7.
- RichText's release channel. RichText stays canary-only.
- Equivalent internal implementations remain valid when they satisfy this
contract, except the character reference decoder, which DEC-5 makes one
@@ -224,6 +224,22 @@ start value and the items stay as written. Task list items show checkboxes
instead of markers. Markers are presentation: the
list keeps its list semantics, and the source does not change.
+### DEC-7 — RichText is a form-field editor whose value is Lexical editor state
+
+**Reference:** `spec:AST-061/DEC-7`
+**Decider:** cixzhang, 2026-10-14
+
+`RichTextEditor` is a public form-field editor: a labelled field in which a
+person writes formatted text. Its value is serialized Lexical `EditorState`
+JSON: `defaultValue` takes it, `onChange` reports the editor state that
+serializes to it, and `RichTextView` renders it. Markdown is an import and
+export format, not the value: `markdownToEditorStateJSON` and
+`editorStateJSONToMarkdown` convert between the two, and `spec:AST-062` owns
+what that conversion returns. RichText is not a document editor; collaboration,
+persistence, and document hosting stay outside it, and a product that edits
+whole documents chooses its own engine and stored value. This record stays
+the one visual contract that RichText and `Markdown` share.
+
## Open questions
- None.