/**
 * Create an editor state with some text in it already
 */ import { ContentState , EditorState } from 'draft-js' ; export default function createEditorStateWithText ( text ) { if ( EditorState . createWithText ) { return EditorState . createWithText ( text ) ; } return EditorState . createWithContent ( ContentState . createFromText ( text ) ) ; }