An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          


alt text


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