Friday, July 28, 2017

reactjs : draftjs how to initiate an editor with content



Stumbled on this cool text editor, draft.js by facebook. I try to follow the example in github but I want to create an editor with content instead an empty editor. The first argument to EditorState.createWithContent is a ContentState, not a string. You need to import ContentState

No comments:

How can you work with a JSON value if you know nothing about it?

I have talked about the difficulty of typing certain JSON values coming from some APIs. The JSON is just very complicated. When I do that,...