Remove lexical-helpers (#1466)

* Remove lexical-helpers

* Add midding ref
This commit is contained in:
Dominic Gannaway
2022-03-15 22:11:43 +00:00
committed by acywatson
parent b70a435b83
commit ecbd46e5c0
55 changed files with 339 additions and 289 deletions

View File

@ -9,9 +9,9 @@
import type {LexicalEditor, LexicalNode} from 'lexical';
import {$dfs} from '@lexical/helpers/nodes';
import {$textContentCurry} from '@lexical/helpers/root';
import withSubscriptions from '@lexical/react/withSubscriptions';
import {$rootTextContentCurry} from '@lexical/text';
import {$dfs} from '@lexical/utils';
import {
$getSelection,
$isLeafNode,
@ -52,7 +52,7 @@ export function useCharacterLimit(
}, [editor]);
useEffect(() => {
let text = editor.getEditorState().read($textContentCurry);
let text = editor.getEditorState().read($rootTextContentCurry);
let lastComputedTextLength = 0;
return withSubscriptions(