Repository navigation
[lexical-website] Documentation Update: useReactDecorators, and the three missing TextNode formats - #9201
Merged
Conversation
…hree missing TextNode formats
## Description
Two small drifts in `concepts/nodes.mdx`:
1. Two paragraphs describe decorator rendering as "Using `useDecorators`,
`PlainTextPlugin` and `RichTextPlugin` ...". There is no `useDecorators` in
`@lexical/react`; the hook is `useReactDecorators`.
2. The `TextNode` section lists eight text formats. `TEXT_TYPE_TO_FORMAT` has
eleven — `capitalize`, `lowercase` and `uppercase` are missing from the doc.
## Test plan
Documentation-only change (markdown is excluded from prettier via
`.prettierignore`), so the check is that the names and the list match source.
### Before
```
$ grep -n "useDecorators" packages/lexical-website/docs/concepts/nodes.mdx
780:Using `useDecorators`, `PlainTextPlugin` and `RichTextPlugin` executes `React.createPortal(reactDecorator, element)` for each `DecoratorNode`,
1016:Using `useDecorators`, `PlainTextPlugin` and `RichTextPlugin` executes `React.createPortal(reactDecorator, element)` for each `DecoratorNode`,
$ grep -rn "useDecorators" packages/lexical-react/src | wc -l
0
$ sed -n '65p' packages/lexical-website/docs/concepts/nodes.mdx
- `format` any combination of `bold`, `italic`, `underline`, `strikethrough`, `code`, `highlight`, `subscript` and `superscript`
```
### After
```
$ grep -n "useReactDecorators" packages/lexical-website/docs/concepts/nodes.mdx
780:Using `useReactDecorators`, `PlainTextPlugin` and `RichTextPlugin` executes [...]
1016:Using `useReactDecorators`, `PlainTextPlugin` and `RichTextPlugin` executes [...]
$ grep -n "export function useReactDecorators" packages/lexical-react/src/shared/useReactDecorators.tsx
18:export function useReactDecorators(
$ sed -n '65p' packages/lexical-website/docs/concepts/nodes.mdx
- `format` any combination of `bold`, `italic`, `underline`, `strikethrough`, `code`, `highlight`, `subscript`, `superscript`, `lowercase`, `uppercase` and `capitalize`
$ sed -n '/TEXT_TYPE_TO_FORMAT/,/^};/p' packages/lexical/src/LexicalConstants.ts
export const TEXT_TYPE_TO_FORMAT: Record<TextFormatType | string, number> = {
bold: IS_BOLD,
capitalize: IS_CAPITALIZE,
code: IS_CODE,
highlight: IS_HIGHLIGHT,
italic: IS_ITALIC,
lowercase: IS_LOWERCASE,
strikethrough: IS_STRIKETHROUGH,
subscript: IS_SUBSCRIPT,
superscript: IS_SUPERSCRIPT,
underline: IS_UNDERLINE,
uppercase: IS_UPPERCASE,
};
```
The documented list is now the eleven formats in `LexicalConstants.ts:136-148`.
potatowagon
requested review from
acywatson,
etrepum,
fantactuka,
ivailop7 and
zurfyx
as code owners
September 23, 2026 06:31
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
approved these changes
Sep 23, 2026
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two small drifts in
concepts/nodes.mdx:useDecorators,PlainTextPluginandRichTextPlugin...". There is nouseDecoratorsin@lexical/react; the hook isuseReactDecorators.TextNodesection lists eight text formats.TEXT_TYPE_TO_FORMAThaseleven —
capitalize,lowercaseanduppercaseare missing from the doc.Test plan
Documentation-only change (markdown is excluded from prettier via
.prettierignore), so the check is that the names and the list match source.Before
After
The documented list is now the eleven formats in
LexicalConstants.ts:136-148.