use bold, italic and underline markdown for chat while typing
npm install react-native-usemarkdown-chat
import useMarkdown, { textToMarkdown } from 'react-native-usemarkdown-chat';
// ...
const [text, setText] = useMarkdown();
textToMarkdown function is not hook it is basically text to markdown converter. you can use this for making own custom useState.
import * as React from 'react';
import { StyleSheet, View, TextInput } from 'react-native';
import useMarkdown from 'react-native-usemarkdown-chat';
export default function App() {
const [text, setText] = useMarkdown();
return (
<View style={styles.container}>
<TextInput style={styles.input} value={text} onChangeText={setText} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
input: {
width: '100%',
height: 100,
backgroundColor: 'gray',
fontSize: 30,
},
});
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT