Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Add convertToHTML example for version 0.9.1 #833

Merged
merged 5 commits into from
Dec 2, 2016

Conversation

tobiasandersen
Copy link
Contributor

Summary
This PR adds a convertToHTML example for version 0.9.1 (only present for 0.10.0 currently). In it, I've removed everything that has to do with images (since that's not supported in 0.9.1), and updated the link decorator to use the old API for entities. Note that this example won't work on master (because of the change to entities). Maybe we should add some information about this somewhere?

This should also fix the broken link in the bottom of this document: https://github.com/facebook/draft-js/blob/master/docs/APIReference-Data-Conversion.md#convertfromhtml. It's currently pointing to a file that doesn't exist (just noticed this now).

I've also updated that document to use the API for version 0.9.1, since it was creating confusion (see #809). Let me know if this isn't correct (or just remove it)!

@tobiasandersen tobiasandersen changed the title Convert from html Add convertToHTML example for version 0.9.1 Dec 2, 2016
@flarnie flarnie self-assigned this Dec 2, 2016
@flarnie
Copy link
Contributor

flarnie commented Dec 2, 2016

Thanks for fixing this! 😄
I'll push an update to that link you mentioned and then land this.

@tobiasandersen
Copy link
Contributor Author

Great! There seems to be a bit of a confusion/worry, both here on the issue tracker and in the slack channel, about these changes. I think it would be a good idea to clarify what's going on. Some questions I've seen come up are e.g:

  • Is there any ETA for v0.10.0?
  • What will happen when v0.10.0 is released? Will it be breaking?
  • Why are we doing this?
  • What's going on with the examples?
  • What should I do in the meantime?

I can't answer all of these questions (e.g. I don't know when the next release will be). And I'm not really sure where this info would make sense either. In the docs somewhere? In the README?

@flarnie flarnie merged commit 6c6946b into facebookarchive:master Dec 2, 2016
@flarnie flarnie mentioned this pull request Dec 2, 2016
@flarnie
Copy link
Contributor

flarnie commented Dec 4, 2016

Thanks @tobiasandersen - just made an issue for answering some of those questions. #839

ouchxp pushed a commit to ouchxp/draft-js that referenced this pull request Apr 7, 2017
* Add convertFromHTML example for 0.9.1

* Update docs with convertFromHTML example

* Remove image from convertFromHTML example in 0-9-1

* Update 0.9.1 convertFromHTML example to use the old Entity API

* Fix link to convertToHTML example in docs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants