This is an editor module based on Quill.js and MathQuill which provide a friendly LaTeX input textarea for user in NTU-COOL.
npm install symphony-richeditor
npm i symphony-richeditor --save
`
or
`
yarn add symphony-richeditor
`
Usage
Import the component
`js
import RichEditor from 'symphony-richeditor'; // ES6
import * as RichEditor from 'symphony-richeditor'; // Typescript
const RichEditor = require('symphony-richeditor'); // CommonJS
`
Use the component
`js
import React from 'react';
import RichEditor from 'symphony-richeditor';
class App extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
placeholder={'Write something'}
onDocumentChange={(html) => {
console.log(html)
}}
/>
);
}
};
ReactDOM.render( , document.getElementById('app'));
``