https://github.com/jamilur-r/doge-editor
https://github.com/jamilur-r/doge-editor
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jamilur-r/doge-editor
- Owner: jamilur-r
- Created: 2021-08-16T20:15:01.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-16T20:15:08.000Z (almost 4 years ago)
- Last Synced: 2024-04-29T03:44:04.653Z (about 1 year ago)
- Language: TypeScript
- Size: 1.31 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# doge-editor
> a rich text editor library made with react, for react.
[](https://www.npmjs.com/package/doge-editor) [](https://standardjs.com)
## Install
```bash
npm install --save doge-editor
```
## Usage
```tsx
import React, { useState } from 'react'import { DogeEditor } from 'doge-editor'
import 'doge-editor/dist/index.css'const App = () => {
const [data, setData] = useState([])
return
}export default App
```# Data -
Here data holds all your data from editor and can be accessed as an array.
The data looks like the object below```js
data = [
{
type: 'h1',
content: 'text body'
}
]
```content types are - h1, h2, p and image for now.
image type contains file upload data as image. you will need to handle it on your own## License
MIT © [jamilur-r](https://github.com/jamilur-r)