<commit_before>## Medium style editor in reactjs


React Editor
===========
Rich content editor component. Super alpha and under heavy dev.

Usage
-----
```xml
<Editor content={object} onChange={fn} />
```

Inside an app
-----
```js
var React = require('react');
var ReactEditor = require('react-editor');
var { Editor } = ReactEditor;
var Store = require('./ContentStore.json');

var App = React.createClass({
  getInitialState: function() {
    return { content: {} }
  },

  componentWillMount: function() {
    this.setState({content: Store.find()});
  },

  contentChanged: function(json) {
    // handle when content changes
  },

  render: function() {
    return (
      <div>
        <h1>React Editor</h1>
        <Editor content={this.state.content} onChange={this.contentChanged} />
      </div>
    );
  }
});

React.render(<App/>, document.body);
```

To run tests
-----

```bash
npm test
```<commit_msg>start documenting how new api changes will work<commit_after>## Medium style editor in reactjs


React Editor
===========
Rich content editor component. Super alpha and under heavy dev.

Usage
-----
```xml
<Editor>
  <Content content={object} onChange={fn} />
  <Toolbar.Basic />
</Editor>
```

Inside an app
-----
```js
var React = require('react');
var ReactEditor = require('react-editor');
var { Editor, Content, Toolbar, Button } = ReactEditor;
var ContentStore = require('./ContentStore.json');

var App = React.createClass({
  getInitialState: function() {
    return { content: {} }
  },

  componentWillMount: function() {
    this.setState({content: ContentStore.find()});
  },

  contentChanged: function(json) {
    // handle when content changes
  },

  render: function() {
    return (
      <div>
        <h1>React Editor</h1>
        <Editor>
          <Content content={this.state.content} onChange={this.contentChanged} />
          <Toolbar.Basic />
        </Editor>
      </div>
    );
  }
});

React.render(<App/>, document.body);
```

To run tests
-----

```bash
npm test
```

To view examples
-----

```bash
npm run examples
```
{'fraction_non_alphanumeric': 0.17681159420289855, 'fraction_numerical': 0.001932367149758454, 'mean_word_length': 3.1172962226640157, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1479447', 'n_tokens_mistral': 648, 'n_tokens_neox': 624, 'n_words': 171}