Git Product home page Git Product logo

draft-js-utils-deprecated's Introduction

Collection of utilities for DraftJS

PROJECT MOVED

This project has moved. It is now part of a monorepo which includes several other draft-js utilities related to import/export of content.

New Location

draft-js-utils-deprecated's People

Contributors

gregziegan avatar johanneslumpe avatar sstur avatar sugarshin avatar

Stargazers

 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

draft-js-utils-deprecated's Issues

Move some other `draft-js` modules to this org

I'm thinking about moving the following modules from my personal Github sstur to draft-js-utils. Any thoughts on if that's a good idea?

  • draft-js-export-html
  • draft-js-import-html
  • draft-js-export-markdown
  • draft-js-import-markdown
  • draft-js-import-element (used by import-html and import-markdown)

Make `getSelectedBlocks` more generic in terms of arguments

I was thinking more about this and I started to dislike the idea that we have to pass anchorKey and focusKey to the method.

If @ianstormtaylor would add his getSelection method from https://gist.github.com/ianstormtaylor/cfcaa8df52fb574e02c908f100fb29be to the utils (or we can do it if he's fine with it) then getSelectedBlocks could accept either:

  • a custom selection state
  • an editor state
  • a content block (even though that wouldn't make a lot of sense in this case)

We'd reduce the number of arguments from 3 to 1 and add more flexibility to it. Thoughts?

Rename to draft-js-utils

I would suggest to rename it to draft-js-utils and then republish it on npm.

For npm it's probably best if you publish it and then add others as owner. There is a command to do so: https://docs.npmjs.com/cli/owner

This should work npm owner add nikgraf.

Setting flow up properly

@sstur You are using flow within your files, but the repo does not reference flow as dev dependency, nor is there any npm command to type check the code. Would you be up for fixing that? :)

Peer deps out date

This module has draft-js@^0.5.0 as a peerDep but the latest is ^0.7.0. Installing the current draft js and draft js utils breaks deployment on heroku as is.

Agree on approving pull requests

I'm new to doing open source projects, and I just want to know if there are standards or if you have preferences on how PRs get approved.

Is it enough that one person approves and does the merge? Or should we approve the PR via a comment so that others are able to review it as well? And is it the person approving the PR that is pressing merge, or the person that created the PR?

Agree on coding style

I like the airbnb eslint config. What are your thoughts on it?

Full disclosure: I like trailing commas and semicolons ;)

Setup the structure to work with direct imports

I can imagine that this quickly will grow into an library with many utils while people only need few of them. I suggest we make the structure is done in a way that you directly can import each util like this:

// just import getEntityRanges without importing the whole library
import getEntityRanges from 'draft-js-utils/getEntityRanges';

This way people don't have to get the whole library. With tree-shaking activated it wouldn't matter, but as far as I understood this is not active by default in most webpack/browserify setups.

This is what I consider to be not ideal:

// import the whole lib and get getEntityRanges
import { getEntityRanges } from 'draft-js-utils';

What are you thoughts?

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.