diff --git a/README.md b/README.md index 16ee25274b5..231fc7b8d97 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ Editor States are also fully serializable to JSON and can easily be serialized b When you want to change something in an Editor State, you must do it via an update, `editor.update(() => {...})`. The closure passed to the update call is important. It's a place where you have full "lexical" context of the active editor state, and it exposes -access to the underling Editor State's node tree. We promote using `$` prefixed functions in this context, as it signifies a place +access to the underlying Editor State's node tree. We promote using `$` prefixed functions in this context, as it signifies a place where they can be used exclusively. Attempting to use them outside of an update will trigger a runtime error with an appropriate error. For those familiar with React Hooks, you can think of these has having a similar functionality (except `$` functions can be used in any order). diff --git a/packages/lexical-website-new/docs/intro.md b/packages/lexical-website-new/docs/intro.md index b9ded0b99d1..095ba1b8255 100644 --- a/packages/lexical-website-new/docs/intro.md +++ b/packages/lexical-website-new/docs/intro.md @@ -56,7 +56,7 @@ Editor States are also fully serializable to JSON and can easily be serialized b When you want to change something in an Editor State, you must do it via an update, `editor.update(() => {...})`. The closure passed to the update call is important. It's a place where you have full "lexical" context of the active editor state, and it exposes -access to the underling Editor State's node tree. We promote using `$` prefixed functions in this context, as it signifies a place +access to the underlying Editor State's node tree. We promote using `$` prefixed functions in this context, as it signifies a place where they can be used exclusively. Attempting to use them outside of an update will trigger a runtime error with an appropriate error. For those familiar with React Hooks, you can think of these has having a similar functionality (except `$` functions can be used in any order).