draft-js icon indicating copy to clipboard operation
draft-js copied to clipboard

handlePastedText is listed in docs but not in npm code yet.

Open coryasato opened this issue 10 years ago • 3 comments

I had to fork, build and copy over editOnPaste to get DraftEditor.handlePastedText. However, this is listed in the docs https://facebook.github.io/draft-js/docs/api-reference-editor.html#handlepastedtext at the moment. Curious when the next npm bump is going to be as I need to access the html onPaste to clean up some things (i.e. tables, pasted code from github, etc.).

*Side note: Whats the recommended way to use the latest versions in our npm packages? Basically to skirt this issue and further similar ones in the future.

coryasato avatar Mar 31 '16 19:03 coryasato

I've generally been doing releases on Tuesday afternoons to allow all released changes to already be live in production on FB, as that is when our major weekly release occurs. I'll see about doing one a little sooner than that.

Sorry for the confusion re: docs -- this is an unfortunate drawback of our auto-syncing docs without also pushing a release.

I'm pretty new to npm, so I'm not actually sure of the best way to get the freshest changes without waiting for the next release. @spicyj, @zpao?

hellendag avatar Mar 31 '16 21:03 hellendag

Makes sense re: Tuesdays. For upcoming releases you can use npm's dist-tag feature I believe, to create another tag other than latest (which is the default) with the current source on master (you'd need to bump in package.json). The other tag tends to be called next. For an example of a library in the wild that uses that practice, check out Koa.

ianstormtaylor avatar Mar 31 '16 22:03 ianstormtaylor

We've been doing next for React as well. When the release cycle is as fast as draft is going, I'm not sure how valuable publishing an alpha as next would really be. 0.3 is a week old and there have been 2(?) commits to src/ since then. If you absolutely need the latest before it ships anywhere, you can always build locally.

zpao avatar Apr 01 '16 00:04 zpao