-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Draft.js API improvements in 0.10.0 and 0.11.0 #839
Comments
Just an update - we released 0.10.0, including the deprecation of Next steps:
|
Awesome! Great job @flarnie 🥇 |
Nice! Looking forward to seeing the changes. 🎉 |
It is unclear to me how import from any source other than "raw" That is, our use case involves storing Editor results in HTML after editing with Entities which correspond to various XHTML tags within the stored data. We are using HubSpot/draft-convert, which offers nice "hooks" to analyze the HTML/DOM as it is being parsed, and we create Entities for various parts of the document at parsing time. Like the built-in If Entities cannot be created without a ContentState instance, is the suggested import process now to create an empty ContentState, then add Blocks and Entities to it as they are parsed? Or asked a different way: Is there any non-deprecated As implied in HubSpot/draft-convert#38, our usage of draft-convert already generates "DraftEntity.create will be deprecated soon!" warnings in 0.10, and it sounds like it will stop working in 0.11. |
Awesome work! When is a release of v0.11.0 likely :) ? |
If I go back to a previous state via undo, will the entities also fall back to the state they were in at that point? |
Since the Edit: After looking at the alpha branch it looks like this use has already been solved by returning entity map along with the array of content blocks |
About breaking changes @flarnie First of all thanks for drive Draft JS! — I have a question related to the migrating 0.9x to 0.10.x seems Happy to look into this. |
Hi @MadebyAe - I think I would need more details to understand your question and why this is a problem. Could you open an issue and describe how you've run into this bug? |
Why breaking change on |
I'll be giving this a shot now since @flarnie has since left the project. Evidently, this wont ship on v0.11.0, since that's already shipped with both APIs. The old API will be removed on version v0.12.0. @BrodaNoel pre version 1, minor versions can be breaking too. |
Closing in favour of #2650, since the |
What: The API for managing entities will be moved from the global
Entity
module intocontentState
, with a deprecation warning in v0.10.0 and a full breaking change in v0.11.0.Why:
Other maintainers - feel free to add detail and say this more eloquently.
Will 0.10.0 include breaking changes?
Nope! When you update to v0.10.0, you should start seeing warnings in the console when the old
Entity
module API is used. The new API, usingcontentState
will be supported, and you can migrate to the new API incrementally.We will put out documentation about how to update all use cases when releasing 0.10.0.
Once you are fully migrated to the new API, you can update to 0.11.0, which will include the fully breaking change and will also include the benefits of the new API.
What's taking so long???
The text was updated successfully, but these errors were encountered: