Skip to content

Commit 018848c

Browse files
committed
Document creation functions
1 parent 8d4eda3 commit 018848c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,20 @@ import { createEmpty } from 'draft-js-plugin-editor';
3737
const editorState = createEmpty(plugins);
3838
```
3939

40-
#### createWithContent (coming soon …)
40+
#### createWithText
4141

42-
Function to creates an EditorState based on leveraging the decorators of the provided plugins.
42+
Function to creates an EditorState with some text.
43+
44+
Usage:
45+
```
46+
import { createWithText } from 'draft-js-plugin-editor';
47+
48+
const editorState = createWithText('Hello World!', plugins);
49+
```
50+
51+
#### createWithContent
52+
53+
Function to creates an EditorState with provided pre-used data.
4354

4455
Usage:
4556
```

0 commit comments

Comments
 (0)