https://github.com/numandev1/react-native-usemarkdown-chat
hook for chats markdown in Textinput
https://github.com/numandev1/react-native-usemarkdown-chat
bold chat editor hook italc markdown markdown-editor underline
Last synced: 3 months ago
JSON representation
hook for chats markdown in Textinput
- Host: GitHub
- URL: https://github.com/numandev1/react-native-usemarkdown-chat
- Owner: numandev1
- License: mit
- Created: 2021-09-24T10:36:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-30T06:49:37.000Z (almost 5 years ago)
- Last Synced: 2026-02-24T21:25:44.360Z (5 months ago)
- Topics: bold, chat, editor, hook, italc, markdown, markdown-editor, underline
- Language: TypeScript
- Homepage: https://614db906865efbc908490c6f--react-native-usemarkdown-chat-hook.netlify.app/
- Size: 1010 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
use bold, italic and underline markdown for chat while typing
# [Demo](https://614db906865efbc908490c6f--react-native-usemarkdown-chat-hook.netlify.app/)
## Installation
```sh
npm install react-native-usemarkdown-chat
```
## Usage
```js
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.
## Example Code
```js
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 (
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
input: {
width: '100%',
height: 100,
backgroundColor: 'gray',
fontSize: 30,
},
});
```
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT