diff --git a/libs/components/editor-blocks/src/components/text-manage/TextManage.tsx b/libs/components/editor-blocks/src/components/text-manage/TextManage.tsx index f433c1fba9..e42a85c5ed 100644 --- a/libs/components/editor-blocks/src/components/text-manage/TextManage.tsx +++ b/libs/components/editor-blocks/src/components/text-manage/TextManage.tsx @@ -4,10 +4,7 @@ import { type SlateUtils, type TextProps, } from '@toeverything/components/common'; -import { - useOnSelectActive, - useOnSelectSetSelection, -} from '@toeverything/components/editor-core'; +import { useOnSelectActive } from '@toeverything/components/editor-core'; import { styled } from '@toeverything/components/ui'; import { ContentColumnValue } from '@toeverything/datasource/db-service'; import { @@ -119,15 +116,6 @@ export const TextManage = forwardRef( const properties = block.getProperties(); - const onTextViewSetSelection = (selection: Range | Point) => { - if (selection instanceof Point) { - //do some thing - } else { - textRef.current.setSelection(selection); - } - }; - - // block = await editor.commands.blockCommands.createNextBlock(block.id,) const onTextViewActive = useCallback( (point: CursorTypes) => { // TODO code to be optimized @@ -209,7 +197,6 @@ export const TextManage = forwardRef( ); useOnSelectActive(block.id, onTextViewActive); - useOnSelectSetSelection<'Range'>(block.id, onTextViewSetSelection); useEffect(() => { if (textRef.current) {