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:

Finite-State Machines, Part 1: Modeling with Haskell Data Types

Stateful programs often become complex beasts as they grow. Program state incohesively spread across a bunch of variables, spuriously guar...