Skip to content
Rich Text Editor built with React and ProseMirror
JavaScript CSS Other
Branch: master
Clone or download
hedgerwang Merge pull request #85 from chanzuckerberg/fix_convert_nested_html
Support converting HTML with nested list elements
Latest commit 540fffb Jun 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo more cleanups. May 17, 2019
dist
flow-typed Create <EditorFrameset /> to manage layout for RichTextEditor Jan 25, 2019
playground fix style lint errors Apr 25, 2019
scripts add check for unchanged dist in ci Apr 29, 2019
src Use `HTMLMutator` to fix nested list elements. Jun 5, 2019
.babelrc remove dynamic import of mathquill May 6, 2019
.eslintignore add prettier Apr 25, 2019
.eslintrc [FIX]: List counter style should match its content. May 31, 2019
.flowconfig
.gitattribute
.gitignore fix updateIndentLevel.js Dec 20, 2018
.prettierignore add stylelint + config Apr 25, 2019
.prettierrc add prettier Apr 25, 2019
.stylelintignore add stylelint + config Apr 25, 2019
.stylelintrc.json revert .stylelintrc.json May 3, 2019
.travis.yml update dist with latest changes Apr 29, 2019
CODEOWNERS Add CODEOWNERS May 10, 2019
LICENSE initial check-in. Sep 28, 2018
README.md Update README.md May 9, 2019
lint.sh use eslint. Dec 8, 2018
package-lock.json Merge branch 'master' into dcwither/remove-dynamic-import May 7, 2019
package.json Merge branch 'master' into dcwither/remove-dynamic-import May 7, 2019
webpack.config.js

README.md

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


CZI-ProseMirror · Build Status


Getting Started

Getting repository

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 start

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

Build the distribution files

# At the working directory `czi-prosemirror`
npm run build:dist

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;

Use it for your own project

This project still under active development. There will be NPM package published later. For now, you can install using the commit hash to include the package to your own package.json.

For example:

npm install --save "chanzuckerberg/czi-prosemirror#8313aa0970b607c17019f7a5cc8df58c46e78916"

You may find the latest commit hash at https://github.com/chanzuckerberg/czi-prosemirror/commits/master

You can’t perform that action at this time.