Last active
January 5, 2017 08:00
-
-
Save tomat/ee6f7e1a95328f114d79467beb186ba1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| export default class MyTextEditor extends Component { | |
| componentDidMount() { | |
| import('jquery').then((jquery) => { | |
| window.jQuery = jquery; | |
| window.$ = jquery; | |
| import('../lib/redactor/redactor.js').then(() => { | |
| $(this.refs.textarea).redactor(); | |
| }); | |
| }); | |
| } | |
| render() { | |
| return ( | |
| <textarea ref="textarea"></textarea> | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment