1
1
import { Str } from 'expensify-common' ;
2
- import type { ForwardedRef } from 'react' ;
2
+ import type { ForwardedRef , MutableRefObject } from 'react' ;
3
3
import React , { forwardRef , useCallback , useEffect , useMemo , useRef , useState } from 'react' ;
4
- import type { GestureResponderEvent , LayoutChangeEvent , NativeSyntheticEvent , StyleProp , TextInputFocusEventData , ViewStyle } from 'react-native' ;
4
+ import type { GestureResponderEvent , LayoutChangeEvent , NativeSyntheticEvent , StyleProp , TextInput , TextInputFocusEventData , ViewStyle } from 'react-native' ;
5
5
import { ActivityIndicator , Animated , StyleSheet , View } from 'react-native' ;
6
6
import Checkbox from '@components/Checkbox' ;
7
7
import FormHelpMessage from '@components/FormHelpMessage' ;
@@ -17,6 +17,7 @@ import Text from '@components/Text';
17
17
import * as styleConst from '@components/TextInput/styleConst' ;
18
18
import TextInputClearButton from '@components/TextInput/TextInputClearButton' ;
19
19
import TextInputLabel from '@components/TextInput/TextInputLabel' ;
20
+ import useHtmlPaste from '@hooks/useHtmlPaste' ;
20
21
import useLocalize from '@hooks/useLocalize' ;
21
22
import useMarkdownStyle from '@hooks/useMarkdownStyle' ;
22
23
import useStyleUtils from '@hooks/useStyleUtils' ;
@@ -103,6 +104,7 @@ function BaseTextInput(
103
104
const labelTranslateY = useRef ( new Animated . Value ( initialActiveLabel ? styleConst . ACTIVE_LABEL_TRANSLATE_Y : styleConst . INACTIVE_LABEL_TRANSLATE_Y ) ) . current ;
104
105
const input = useRef < HTMLInputElement | null > ( null ) ;
105
106
const isLabelActive = useRef ( initialActiveLabel ) ;
107
+ useHtmlPaste ( input as MutableRefObject < TextInput | null > , undefined , false , isMarkdownEnabled ) ;
106
108
107
109
// AutoFocus which only works on mount:
108
110
useEffect ( ( ) => {
0 commit comments