1.0.2 • Published 4 years ago

doge-editor v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

doge-editor

a rich text editor library made with react, for react.

NPM JavaScript Style Guide

Install

npm install --save doge-editor

Usage

import React, { useState } from 'react'

import { DogeEditor } from 'doge-editor'
import 'doge-editor/dist/index.css'

const App = () => {
  const [data, setData] = useState([])
  return <DogeEditor data={data} setData={setData} />
}

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

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

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago