1.0.3 • Published 3 days ago

react-weblineindia-ck-editor v1.0.3

Weekly downloads
6
License
MIT
Repository
github
Last release
3 days ago

ReactJS - CKEditor / WYSIWYG Editor

A simple, native and easy-to-use WYSIWYG / Rich Text editor built in Quill.js and React.js

Table of contents

Browser Support

ChromeFirefoxSafariEdgeIE
83.0 ✔77.0 ✔13.1.1 ✔83.0 ✔11.9 ✔

Demo

npm.io

Getting started

Install the npm package:

npm install react-weblineindia-ck-editor
#OR
yarn add react-weblineindia-ck-editor

Usage

Use the <react-weblineindia-ck-editor> component:

import React, { Component } from "react";
import Editor from "react-weblineindia-ck-editor";
class Test extends Component {
  constructor(props) {
    super(props);
    this.state = {
      editorHtml: "",
    };
  }

  handleChange(html) {
    this.setState({
      editorHtml: html,
    });
  }

  render() {
    return (
      <div>
        <Editor
          onChange={this.handleChange.bind(this)}
          value={this.state.editorHtml}
          bounds=".app"
          placeholder="Type Something"
        />
      </div>
    );
  }
}
export default Test;

Available Props

NameTypeDefaultDescription
idStringquill-containerSet the id (necessary if multiple editors in the same view)
placeholderString-Placeholder text for the editor
valueString-Set value to the the content or data property you wish to bind it to
modulesobjectSet modules
toolbarArraySet toolbar
formatsArraySet formats

Methods

NameParametersDescription
blurquillEmitted on blur event
focusquillEmitted on focus event
onChangeEmitted on change event
onKeyPressEmitted on keypress event
onKeyDownEmitted on keydown event
onKeyUpEmitted on keyup event

Want to Contribute?

  • Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
  • Fork it.
  • Create new branch to contribute your changes.
  • Commit all your changes to your branch.
  • Submit a pull request.

Collection of Components

We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development


Changelog

Detailed changes for each release are documented in CHANGELOG.md.

Credits

react-weblineindia-ck-editor is inspired by react-quill.

License

MIT

Keywords

react-weblineindia-ck-editor, react-ck-editor, reactjs-ck-editor, react-editor, react-ckeditor, rich-text-editor, wysiwyg-editor, reactjs-wysiwyg