mirror of
https://github.com/facebook/lexical.git
synced 2025-08-14 09:42:23 +08:00
Remove lexical-helpers (#1466)
* Remove lexical-helpers * Add midding ref
This commit is contained in:

committed by
acywatson

parent
b70a435b83
commit
ecbd46e5c0
@ -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(
|
||||
|
Reference in New Issue
Block a user