Giter Site home page Giter Site logo

gpanayu / docs-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chanzuckerberg/docs-editor

0.0 0.0 0.0 13.35 MB

rich text editor for education purpose.

License: MIT License

Shell 0.03% JavaScript 11.58% Python 0.14% CSS 0.75% HTML 87.50%

docs-editor's Introduction

docs-editor (archived)

  • Rich Text Editor for education purpose.
  • This project is no longer maintained.

DEMO

http://cdn.summitlearning.org/assets/index_latest.html

Getting start

  1. Clone the repository to your local machine. git clone [email protected]:chanzuckerberg/docs-editor.git
  2. Check if your Node.js version is >= 6.
  3. Start with the project folder cd docs-editor
  4. Run npm install (just for the first time build)

For development

  1. Start with the project folder cd docs-editor
  2. Run killall -9 node; npm run start to start the local dev server
  3. Load http://127.0.0.1:3001/index.html

For deployment to production

  1. Push changes to master
  2. Start with the project folder cd docs-editor
  3. Build master from dev server killall -9 node; NODE_ENV=production npm run build
  4. Build deploy command python generate_deploy_script.py
  5. Execute the command sh deploy_to_s3.sh
  6. Verify that the files are available on s3.

For Your own (React) application

import {DocsEditor, convertFromRaw, convertToRaw}  from 'docs-editor';

class DemoApp extends React.PureComponent<any, any, any> {

  state = convertFromRaw();

  render(): React.Element<any> {
    return (
      <DocsEditor
        editorState={this.state.editorState}
        onChange={this._onChange}
      />
    );
  }

  _onChange = (editorState: Object): void => {
    this.setState({editorState});
    console.log(convertToRaw(editorState));
  };
}

docs-editor's People

Contributors

hedgerwang avatar anniehu4 avatar silvestry avatar dcwither 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.