imnapo / react-native-cn-richtext-editor

Richtext editor for react native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Issue] Editor(next) is not shown in Android

JaeWangL opened this issue · comments

Stable version is ok. But, in next version, and in Android, I can see just white page
My OS is Windows. so, I don't now whether work in iOS or not

    "react": "16.9.0",
    "react-native": "0.61.5",
    "react-native-cn-richtext-editor": "^2.0.0-rc3",
    import CNEditor, { getDefaultStyles, CNToolbar } from 'react-native-cn-richtext-editor';

    const [selectedTag, setSelectedTag] = useState('body');
    const [selectedStyles, setSelectedStyles] = useState<string[]>([]);
    const editorRef = useRef(null);
                <CNEditor
                    ref={editorRef}
                    onSelectedTagChanged={setSelectedTag}
                    onSelectedStyleChanged={setSelectedStyles}
                    style={{ backgroundColor: '#000000' }}
                    styleList={getDefaultStyles()}
                />

@JaeWangL This is an issue with the KeyboardAvoidingView component, I was able to fix by adding conditional props if Android.

<KeyboardAvoidingView behavior={IS_IOS ? "padding" : "height"} enabled keyboardVerticalOffset={IS_IOS ? 0 : 30} style={styles.root}>

@JaeWangL This is an issue with the KeyboardAvoidingView component, I was able to fix by adding conditional props if Android.

<KeyboardAvoidingView behavior={IS_IOS ? "padding" : "height"} enabled keyboardVerticalOffset={IS_IOS ? 0 : 30} style={styles.root}>

Thank you!!