final-draft
final-draft is a Draft.js editor built using draft-js-plugins
Install
npm install final-draft --save
Use
import React Component from 'react'import render from 'react-dom'import editorStateFromHtml editorStateFromRaw from 'final-draft'import Editor from 'final-draft' { thisstate = value: } { this } { return <Editor = ="Text" = = /> } { return resolve reject /* simulate a 2 second call to parse file and return an img src... */ }
Props
plugins
(required)
Array of plugins to include, any of the following: imagePlugin
, emojiPlugin
, hashtagPlugin
, inlineToolbarPlugin
, linkifyPlugin
, mentionPlugin
, sideToolbarPlugin
, stickerPlugin
, undoPlugin
, videoPlugin
Styles
Are using styled-components so they should just work
💅 like magic. They append to a <style>
tag if you want to be specific.
Development
yarn install
npm run dev
open http://127.0.0.1:3000