Repository navigation
[lexical-website] Documentation Update: re-sync the TabIndentationExtension snippet with its source - #9209
Merged
etrepum merged 1 commit intoSep 23, 2026
Conversation
…ension snippet with its source
## Description
`extensions/defining-extensions.md` and `extensions/signals.md` both reproduce
`TabIndentationExtension` as an example of a real shipped extension. Both
copies predate the `$canIndent` option: the interface declares two properties
where the source has three, the `config` object omits its default, and
`register` neither destructures it nor passes it to `registerTabIndentation`.
A reader copying either snippet as a template for their own extension gets a
config that silently drops a documented option.
## Test plan
Documentation-only change (markdown is excluded from prettier via
`.prettierignore`), so the check is that the snippets match the source they
reproduce.
### Before
```
$ grep -n "canIndent" packages/lexical-website/docs/extensions/defining-extensions.md packages/lexical-website/docs/extensions/signals.md
$ sed -n '138,146p' packages/lexical-extension/src/TabIndentationExtension.ts
export interface TabIndentationConfig {
disabled: boolean;
maxIndent: null | number;
/**
* By default, indents are set on all elements for which the {@link ElementNode.canIndent} returns true.
* This option allows you to set indents for specific nodes without overriding the method for others.
*/
$canIndent: CanIndentPredicate;
}
```
Neither copy mentions `$canIndent`.
### After
```
$ grep -n "canIndent" packages/lexical-website/docs/extensions/defining-extensions.md packages/lexical-website/docs/extensions/signals.md
packages/lexical-website/docs/extensions/defining-extensions.md:241: $canIndent: CanIndentPredicate;
packages/lexical-website/docs/extensions/defining-extensions.md:248: $canIndent: $defaultCanIndent,
packages/lexical-website/docs/extensions/defining-extensions.md:253: const {disabled, maxIndent, $canIndent} = state.getOutput();
packages/lexical-website/docs/extensions/defining-extensions.md:256: return registerTabIndentation(editor, maxIndent, $canIndent);
packages/lexical-website/docs/extensions/signals.md:82: $canIndent: CanIndentPredicate;
packages/lexical-website/docs/extensions/signals.md:89: $canIndent: $defaultCanIndent,
packages/lexical-website/docs/extensions/signals.md:94: const {disabled, maxIndent, $canIndent} = state.getOutput();
packages/lexical-website/docs/extensions/signals.md:100: return registerTabIndentation(editor, maxIndent, $canIndent);
```
Both now match `packages/lexical-extension/src/TabIndentationExtension.ts:138-169`.
The `signals.md` copy keeps its own inline comment about `peek`, which is
specific to that page.
potatowagon
requested review from
acywatson,
etrepum,
fantactuka,
ivailop7 and
zurfyx
as code owners
September 23, 2026 17:46
|
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
extensions/defining-extensions.mdandextensions/signals.mdboth reproduceTabIndentationExtensionas an example of a real shipped extension. Bothcopies predate the
$canIndentoption: the interface declares two propertieswhere the source has three, the
configobject omits its default, andregisterneither destructures it nor passes it toregisterTabIndentation.A reader copying either snippet as a template for their own extension gets a
config that silently drops a documented option.
Test plan
Documentation-only change (markdown is excluded from prettier via
.prettierignore), so the check is that the snippets match the source theyreproduce.
Before
Neither copy mentions
$canIndent.After
Both now match
packages/lexical-extension/src/TabIndentationExtension.ts:138-169.The
signals.mdcopy keeps its own inline comment aboutpeek, which isspecific to that page.