Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to draft-js 0.10.0 and to the new Entity API #129

Merged
merged 3 commits into from
Feb 14, 2017

Conversation

mdarcemont
Copy link
Contributor

Hi,

draft-js 0.10.0 contains a new feature that I miss today, the ability to paste paragraphs from HTML or Word while keeping their structure.
See the pull request merged in 0.10.0 : facebookarchive/draft-js#828

So I propose the upgrading from 0.9.1 to 0.10.0. This is not a breaking change (see facebookarchive/draft-js#839 ), I've only seen warnings, that I fixed with replacing some instructions with the new API.

Entity.get(entityKey)

become

contentState.getEntity(entityKey)

Tests are ok !

I hope you'll be able to merge this soon !

@marcelometal
Copy link
Member

Hi @mdarcemont,

There is a brach with initial work, but your pull request is welcome.

Could you please fix the docs?

In the custom entities docs:

197:  const {url} = DraftJS.Entity.get(this.props.entityKey).getData();

@marcelometal marcelometal self-requested a review February 13, 2017 18:54
Copy link
Member

@marcelometal marcelometal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the docs

@mdarcemont
Copy link
Contributor Author

Done !

@marcelometal
Copy link
Member

Thank you!

Did you see my branch? You should fix the Entity.create() too.

d333be0#diff-e007c62f341ba9b8108617f3d82d21c8L161

@mdarcemont
Copy link
Contributor Author

Sorry for missing that !
It's ok now (I hope)

@marcelometal marcelometal merged commit cebedfb into globocom:master Feb 14, 2017
@marcelometal
Copy link
Member

Hi @mdarcemont, thanks for contributing to Megadraft!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants