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

Update Advanced-Topics-Entities.md #1767

Closed
wants to merge 2 commits into from
Closed

Update Advanced-Topics-Entities.md #1767

wants to merge 2 commits into from

Conversation

haikyuu
Copy link
Contributor

@haikyuu haikyuu commented May 17, 2018

Add a line of code in the example to set the editor state after adding the entity.

For a newcomer, it's not straightforward because it wasn't mentioned anywhere in the docs prior to arriving here. Of course, you'll figure it out once you check the example. But let's save newcomers a roundtrip

Summary

Update the docs

Add a line of code in the example to set the editor state after adding the entity.

For a newcomer, it's not straightforward because it wasn't mentioned anywhere in the docs prior to arriving here. Of course, you'll figure it out once you check the example. But let's save newcomers a roundtrip
@mzedeler
Copy link

Good idea :-)

I would prefer if the line used EditorState.push(...), since it would become and undoable operation which is usually what people want.

@niveditc
Copy link
Contributor

niveditc commented Sep 8, 2018

Thank you for improving our docs, @haikyuu! I like @mzedeler's suggestion above - could you please amend your commit? Once that's done I can merge it in :)

Copy link
Contributor

@niveditc niveditc left a comment

Choose a reason for hiding this comment

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

Please use EditorState.push here instead.

Change `set` to `push`
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

niveditc is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

jdecked pushed a commit to twitter-forks/draft-js that referenced this pull request Oct 9, 2019
Summary:
Add a line of code in the example to set the editor state after adding the entity.

For a newcomer, it's not straightforward because it wasn't mentioned anywhere in the docs prior to arriving here. Of course, you'll figure it out once you check the example. But let's save newcomers a roundtrip

**Summary**

Update the docs
Pull Request resolved: facebookarchive#1767

Differential Revision: D9749305

fbshipit-source-id: 88af5ee30690fa41cc72280a6bad153a17324c33
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
Add a line of code in the example to set the editor state after adding the entity.

For a newcomer, it's not straightforward because it wasn't mentioned anywhere in the docs prior to arriving here. Of course, you'll figure it out once you check the example. But let's save newcomers a roundtrip

**Summary**

Update the docs
Pull Request resolved: facebookarchive/draft-js#1767

Differential Revision: D9749305

fbshipit-source-id: 88af5ee30690fa41cc72280a6bad153a17324c33
aforismesen added a commit to aforismesen/draft-js that referenced this pull request Jul 12, 2024
Summary:
Add a line of code in the example to set the editor state after adding the entity.

For a newcomer, it's not straightforward because it wasn't mentioned anywhere in the docs prior to arriving here. Of course, you'll figure it out once you check the example. But let's save newcomers a roundtrip

**Summary**

Update the docs
Pull Request resolved: facebookarchive/draft-js#1767

Differential Revision: D9749305

fbshipit-source-id: 88af5ee30690fa41cc72280a6bad153a17324c33
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.

4 participants