Skip to content

Rich Text Editor built with React and ProseMirror

License

Notifications You must be signed in to change notification settings

Authoring/czi-prosemirror

 
 

Repository files navigation

Notice: This project still under active development. API documentations will be available later.


CZI-ProseMirror


Getting Started

Getting dependencies

git clone https://github.com/chanzuckerberg/czi-prosemirror.git
cd czi-prosemirror
npm install

Install dependencies

cd czi-prosemirror
npm install

Start the web server

# At the working directory `czi-prosemirror`
npm run start

Test http://localhost:3001/ from your browser

Development with React

import React from 'react';
import {createEmptyEditorState, EditorState, RichTextEditor} from 'czi-prosemirror';

class Example extends React.PureComponent {

  constructor(props) {
    super(props, context);
    this.state = {
      editorState: createEmptyEditorState(),
    };
  }

  render() {
    const {editorState, editorView} = this.state;
    return (
      <RichTextEditor
        editorState={editorState}
        onChange={this._onChange}
      />
    );
  }

  _onChange = (editorState: EditorState): void => {
    this.setState({editorState});
  };
}

export default Example;

About

Rich Text Editor built with React and ProseMirror

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.2%
  • CSS 23.9%
  • Other 0.9%