1.1.9 • Published 5 years ago

symphony-richeditor v1.1.9

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Symphony-RichEditor

Customized Quill React component for NTU-COOL Symphony module. Based on Quill.js and MathQuill.

:cat2: Using instructure-ui

Install

npm i symphony-richeditor --save

or

yarn add symphony-richeditor

Usage

Import the component

import RichEditor from 'symphony-richeditor'; // ES6
import * as RichEditor from 'symphony-richeditor'; // Typescript
const RichEditor = require('symphony-richeditor'); // CommonJS

Use the component

import React from 'react';
import RichEditor from 'symphony-richeditor';

class App extends React.Component {
  constructor(props) {
      super(props);
  }

  render() {
    return (
      <div>
        <RichEditor 
          placeholder={'Write something'}
          onDocumentChange={(html) => {
            console.log(html)
          }}
        />
      </div>
    );
  }
};

ReactDOM.render(<App />, document.getElementById('app'));