inferno-tinymce
v0.1.1
Published
Inferno TinyMCE component
Downloads
2
Readme
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