From b3dd83d6b1e18faa04b45886748e7fc77f08a162 Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Sat, 30 Nov 2024 10:21:25 -0800 Subject: [PATCH] Update packages/lexical-website/docs/concepts/node-replacement.md --- packages/lexical-website/docs/concepts/node-replacement.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lexical-website/docs/concepts/node-replacement.md b/packages/lexical-website/docs/concepts/node-replacement.md index 48873e59673..1aafbc50595 100644 --- a/packages/lexical-website/docs/concepts/node-replacement.md +++ b/packages/lexical-website/docs/concepts/node-replacement.md @@ -25,7 +25,7 @@ const editorConfig = { In the snippet above, - `replace`: Specifies the core node type to be replaced. - `with`: Defines a transformation function to replace instances of the original node to the custom node. -- `withKlass`: This option ensures that behaviors associated with the original node type work seamlessly with the replacement. For instance, node transforms or listeners targeting ParagraphNode will also apply to CustomParagraphNode when withKlass is specified. Without this option, the custom node might not fully integrate with the editor's built-in features, leading to unexpected behavior. +- `withKlass`: This option ensures that behaviors associated with the original node type work seamlessly with the replacement. For instance, node transforms or mutation listeners targeting ParagraphNode will also apply to CustomParagraphNode when withKlass is specified. Without this option, the custom node might not fully integrate with the editor's built-in features, leading to unexpected behavior. Once this is done, Lexical will replace all ParagraphNode instances with CustomParagraphNode instances. One important use case for this feature is overriding the serialization behavior of core nodes. Check out the full example below.