1

react-native-cn-quill在我的 android 应用程序中用作文本编辑器。QuillToolbar 触摸没有响应。当我尝试从工具栏中选择一个选项时,有时它没有被选中,并且在单击上标/下标选项后,键盘视图会自动退出。有什么解决方案吗?

我正在使用示例代码

import React from 'react';
import { SafeAreaView, StyleSheet, StatusBar } from 'react-native';
import QuillEditor, { QuillToolbar } from 'react-native-cn-quill';
export default function App() {
const _editor = React.createRef();

return (
    <SafeAreaView style={styles.root}>
        <QuillToolbar editor={_editor} options="full" theme="light" />
        <QuillEditor
            style={styles.editor}
            ref={_editor}
        />
    </SafeAreaView>
);
}

const styles = StyleSheet.create({
title: {
fontWeight: 'bold',
alignSelf: 'center',
paddingVertical: 10,
},
root: {
flex: 1,
marginTop: StatusBar.currentHeight || 0,
backgroundColor: '#eaeaea',
},
editor: {
flex: 1,
padding: 0,
borderColor: 'gray',
borderWidth: 1,
marginHorizontal: 30,
marginVertical: 5,
backgroundColor: 'white',
},
});
4

0 回答 0