imnapo / react-native-cn-richtext-editor

Richtext editor for react native
MIT License
218 stars 114 forks source link

text goes in the opposite direction #151

Closed IsmetGlumcevic closed 3 years ago

IsmetGlumcevic commented 3 years ago
react-native: 0.63.4 => 0.63.4 
"react-native-cn-richtext-editor": "^1.0.42",

I follow demo from docs, i don't use expo.

issue: text goes in the opposite direction from right to left row lines goes in the opposite direction from bottom to top

Screenshot 2021-01-13 at 14 23 11

Eldjotnar commented 3 years ago

I had this issue too on react-native 0.63.3. I resolved it by commenting out the selection prop in CNTextInput.js (on line 1335)

return (
        <TextInput
          underlineColorAndroid="rgba(0,0,0,0)"
          onSelectionChange={this.onSelectionChange}
          multiline
          style={[{
            color,
            fontSize: fontSize,
            paddingTop: 5,
            paddingBottom: 5,
            paddingLeft: 2,
            paddingRight: 2,
            textAlignVertical: 'top',
          }, style || {}]}
          scrollEnabled={false}
          returnKeyType={returnKeyType || 'next'}
          keyboardType="default"
          ref={component => this.textInput = component}
          onChangeText={this.handleChangeText}
          onKeyPress={this.handleKeyDown}
          // selection={selection}         <-- this line needs to be commented out
          onFocus={this.onFocus}
          onBlur={this.onBlur}
          onContentSizeChange={this.handleContentSizeChange}
              placeholder={this.props.placeholder}
        >