Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 936 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 936 Bytes

drafti

This is in a Rough state and should not be used. I am building and learning as I go with this project.

NPM JavaScript Style Guide

Install

npm install --save drafti

Usage

import React, {useState} from 'react';
import {EditorState}     from 'draft-js';
import {Drafti}          from 'drafti'

const Example = props => {
    // Set up your editorState
    const [editorState, setEditorState] = React.useState(
        EditorState.createEmpty()
    );
    return (
        <Drafti editorState={editorState}
                setEditorState={setEditorState} />
    )
}

License

MIT © nova4005