Giter Site home page Giter Site 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

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

czi-prosemirror's Issues

Can't install packages due to "prosemirror-tables"

Hi. Since prosemirror-tables uses a direct link to a commit which already doesn't exist the installation of packages is stuck.
"prosemirror-tables": "github:chanzuckerberg/prosemirror-tables#2f2bd5eb94a640e3699ead6faa458c4a4d1e86c0"
any hints to fix it?

development plan?

Hi,

I have been following your progress.

I am working on a project that needs an editor. Yours seems very promising. May I ask when you will release a stable version?

Thanks.

Resizing column on nested table

When inserting a second table inside another one, column resizing on the parent table is acting real weird - I think the child table is pushing for 100% width or something. Also sometimes a new column will be inserted at the end of the parent table. Usually the resize handle gets stuck at that point, breaking the editor for any further adjustments.

Ability to customize toolbar

Hello,
First let me thank you for the great work.
Second, I would like to know how far is it possible to customize toolbar:

  • Hide/Show features like "Code", "Insert Math"
  • Change the behavior of Image picker, let's say I want to extend the image picker by adding a react component. This component allows me to select from list of images saved on the cloud instead of copy/paste the url.

Thank you in advance!

wonderful job

Too bad he's so coupled to react, I don't use react

'make' is not recognized as an internal or external command

Hi, I am trying to install the dependencies for this. After I cloned it I ran npm i and this is what I got:

[email protected] install C:\Users\Theob\Desktop\czi-prosemirror\node_modules\pjs
make commonjs

'make' is not recognized as an internal or external command,
operable program or batch file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: make commonjs
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Theob\AppData\Roaming\npm-cache_logs\2019-11-08T19_47_32_059Z-debug.log

Any help is appreciated, thanks!

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.