Classic editor based on react-rte-slate.
npm install -S @jswork/react-slate-classic
Name | Type | Required | Default | Description |
---|---|---|---|---|
className | string | false | - | The extended className for component. |
value | object | false | null | The changed value. |
onChange | func | false | noop | The change handler. |
- import css
@import "~@jswork/react-slate-classic/dist/style.css";
// or use sass
@import "~@jswork/react-slate-classic/dist/style.scss";
// customize your styles:
$react-slate-classic-options: ()
- import js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactSlateClassic from '@jswork/react-slate-classic';
import './assets/style.scss';
class App extends React.Component {
render() {
return (
<ReactDemokit
className="p-3 app-container"
url="https://github.com/afeiship/react-slate-classic">
<ReactSlateClassic className="mb-5 has-text-white" />
<button className="button is-primary is-fullwidth">Start~</button>
</ReactDemokit>
);
}
}
ReactDOM.render(<App />, document.getElementById('app'));
Code released under the MIT license.