react-ckeditor5-classic

CKEditor5 Classic component for ReactJS

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-ckeditor5-classic
201.1.36 years ago6 years agoMinified + gzip package size for react-ckeditor5-classic in KB

Readme

react-ckeditor5-classic
npm version
NPM

How to install?

npm i react-ckeditor5-classic

How to use?

import React, { Component } from 'react';
import ReactCKEditor from 'react-ckeditor5-classic';

class App extends Component {
  onChange(content){
    console.log("Content: " + content);
  }
  render() {
      return (
          <div className="App">
              <h2>Using CKEditor 5 build in React</h2>
              <ReactCKEditor
                  name='example'
                  content={this.state.content}
                  onChange={this.onChange}
              />
          </div>
      );
  }
}

export default App;

API

props

<thead>
<tr>
    <th style="width: 100px;">name</th>
    <th style="width: 50px;">type</th>
    <th style="width: 150px;">default</th>
    <th>description</th>
</tr>
</thead>
<tbody>
    <tr>
      <td>name</td>
      <td>string</td>
      <td>editor</td>
      <td>Object to init</td>
    </tr>
    <tr>
      <td>onChange</td>
      <td>function</td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>config</td>
      <td>object</td>
      <td>
          height: '300px'
          width: 'auto'
        </td>
      <td>CKEditor config</td>
    </tr>
</tbody>

License

react-ckeditor5-classic is released under the MIT license.