0.1.6 • Published 7 years ago

sub-ed v0.1.6

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

sub-ed

A React component providing Substance as an HTML editor

Usage

// import the ArticleEditor component
import ArticleEditor from 'sub-ed'

// import the Substance and Font Awesome styles
import 'sub-ed/dist/styles.css'

const containerStyle = {
  position: 'fixed',
  top: 0,
  left: 0,
  right: 0,
  bottom: 0,
  overflow: 'hidden'
}

class Foo extends React.Component {
  updateArticle = ({ html }) => {
    // update the saved article
  }
  
  render () {
    const { article } = this.state

    return (
      <div style={containerStyle}>
        <ArticleEditor html={article.html} save={this.updateArticle}/>
      </div>
  }
}
0.1.6

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago