1.0.3-v1.0.1 • Published 5 years ago

simple-react-editor v1.0.3-v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

simple-react-editor

A simple stackoverflow inspired editor.

NPM JavaScript Style Guide

Install

npm install --save simple-react-editor

Usage

import React, { Component } from 'react';

import SimplexEditor from 'simple-react-editor';

class Example extends Component {
  addArticleToState = value => {
    this.setState({ article: value });
  };
  render() {
    return <SimplexEditor getArticle={this.AddArticleToState} />;
  }
}

Update functionality

if you want to insert html content into the editor for editing purpose

import React, { Component } from 'react';

import SimplexEditor from 'simple-react-editor';

class Example extends Component {
  addArticleToState = value => {
    this.setState({ article: value });
  };

  htmlBody = `
  <h1>Hello World</h1>
  <p>We choose to fight because you need to be recognized</p>
  `

  render() {
    return <SimplexEditor getArticle={this.AddArticleToState} content={this.htmlBody}/>;
  }
}

License

MIT © truestbyheart

1.0.3-v1.0.1

5 years ago

1.0.3-v1

5 years ago

1.0.3-v

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.0-fix

5 years ago

1.0.0

5 years ago