Nameless Package Manager

    react-ckeditor-wrapper

    1.1.2 • Public • Published

    react-ckeditor-wrapper


    install

    react-ckeditor-wrapper

    Usage

    Add CKEditor to your index.html from the cdn

        <script src="https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js"></script> 

    or if you want a custom version of ckeditor

         <script src="assets/ckeditor/ckeditor.js"></script> 
    var CKEditor = require('react-ckeditor-wrapper');
     
    class Example  extends Component {
        constructor(props) {
            super(props);
            this.state = {
            content: 'content',
            }
        }
     
        updateContent(value) {
            this.setState({content:value})
        }
     
        render() {
            return (<CKEditor 
            value={this.state.content} 
            onChange={this.updateContent.bind(this)} />)
        }
    }

    With custom config

        render() {
            return (<CKEditor 
            value={this.state.content} 
            onChange={this.updateContent.bind(this)} 
            config={{ readOnly: true }}/>)
        }
     

    Development

    npm install
    npm start
    

    API

    props

    name type default description
    value string Specifies the default value
    onChange function
    config object CKEditor config

    Test Case

    npm test
    npm run chrome-test
    

    Coverage

    npm run coverage
    

    open coverage/ dir

    Deploy to npm

    Because I am sure I will forget

    npm run pub
    

    License

    react-ckeditor-wrapper is released under the MIT license.

    Install

    npm i react-ckeditor-wrapper

    DownloadsWeekly Downloads

    95

    Version

    1.1.2

    License

    none

    Last publish

    Collaborators

    • kaunio
    • luigiinred