Code Monkey home page Code Monkey logo

czi-prosemirror's Introduction

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

czi-prosemirror's People

Contributors

hedgerwang avatar dcwither avatar velveret avatar fresh-prince-of-prosemirror avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.