We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a09957c commit effa968Copy full SHA for effa968
src/App.js
@@ -1,5 +1,5 @@
1
import React, { Component } from 'react';
2
-import { EditorState, Editor } from 'draft-js';
+import { EditorState, Editor, convertToRaw } from 'draft-js';
3
4
class App extends Component {
5
constructor(props) {
@@ -10,6 +10,8 @@ class App extends Component {
10
}
11
12
onChange = (editorState) => {
13
+ const contentState = editorState.getCurrentContent();
14
+ console.log('content state', convertToRaw(contentState));
15
this.setState({
16
editorState,
17
});
0 commit comments