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:

The Y Combinator (Slight Return)

Tiger got to hunt, Bird got to fly; Lisper got to sit and wonder, (Y (Y Y))? Tiger got to sleep, Bird got to land; Lisper got to tell hims...