0.1.1 • Published 7 years ago

inferno-tinymce v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Inferno TinyMCE

Inferno TinyMCE component

Installing

$ npm install --save inferno-tinymce

Example

import Inferno from 'inferno';
import Component from 'inferno-component';
import TinyMCE from 'inferno-tinymce';

class App extends Component {
  handleEditorChange = (e) => {
    console.log('Content was updated:', e.target.getContent());
  }

  render() {
    return (
      <TinyMCE
        config={{
          plugins: 'autolink link image lists print preview',
          toolbar: 'undo redo | bold italic | alignleft aligncenter alignright'
        }}
        onChange={this.handleEditorChange}
      />
    );
  }
}

Inferno.render(<App/>, document.getElementById('root'));

Dependency

This component depends on tinymce being globally accessible.

<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>

OR

Download TinyMCE Community: https://www.tinymce.com/download/

Configuration

TinyMCE Docs: https://www.tinymce.com/docs/

License

MIT