@ridi/ridi-prosemirror-editor

0.0.3 • Public • Published

ridi-prosemirror-editor

🚧 This project is under development, not complete yet.

How to use

ArticleEditor

import { ArticleEditor } from '@ridi/ridi-prosemirror-editor';

const existingValue = JSON.parse(localStorage.getItem('content'));

class App extends Component {
  onChange = (value) => {
    localStorage.setItem('content', JSON.stringify(value.toJSON()));
  };

  render() {
    return (
      <ArticleEditor
        initialValue={existingValue}
        onChange={this.onChange}
      />
    );
  }
}

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

Article

import { Article } from '@ridi/ridi-prosemirror-editor';

const existingValue = JSON.parse(localStorage.getItem('content'));

ReactDOM.render(
  <Article
    json={existingValue}
    style={{
      background: 'white',
      padding: '16px',
    }}
  />,
  document.getElementById('root'),
);

Development

To build

yarn build

To see demos with webpack-dev-server

cd playground
yarn start

/@ridi/ridi-prosemirror-editor/

    Package Sidebar

    Install

    npm i @ridi/ridi-prosemirror-editor

    Weekly Downloads

    1

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    702 kB

    Total Files

    12

    Last publish

    Collaborators

    • hw.choi
    • simulacre7
    • ys.yoon
    • lowfront
    • mando212
    • khinenw
    • davin.ahn
    • ridicorp
    • m0ai
    • ridi-junhee