Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

How to get text from editorState? #20

Closed
mattmacpherson opened this issue Oct 25, 2016 · 2 comments
Closed

How to get text from editorState? #20

mattmacpherson opened this issue Oct 25, 2016 · 2 comments

Comments

@mattmacpherson
Copy link

I started using React about a week ago and am still adjusting to common patterns and conventions. You'll have to excuse me if this is completely obvious but editorState doesn't return any text content so far as I can tell...

@brijeshb42
Copy link
Owner

@method-x Can you goto the editor demo, open developer tools and then click on Log State button. It will log the editor data. You will see the JSON data logged. That is what is stored in the editor state.

@mattmacpherson
Copy link
Author

Ah! I just wasn't looking hard enough through the object.

this.state.editorState.getCurrentContent().getPlainText()

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

No branches or pull requests

2 participants