Skip to content
Permalink
Browse files

use convertFromRaw

  • Loading branch information
Julian Krispel-Samsel
Julian Krispel-Samsel committed Jun 19, 2017
1 parent a09957c commit effa9685bdd1f5725b4e7ba83227708e759539e5
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/App.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { EditorState, Editor } from 'draft-js';
import { EditorState, Editor, convertToRaw } from 'draft-js';

class App extends Component {
constructor(props) {
@@ -10,6 +10,8 @@ class App extends Component {
}

onChange = (editorState) => {
const contentState = editorState.getCurrentContent();
console.log('content state', convertToRaw(contentState));
this.setState({
editorState,
});

0 comments on commit effa968

Please sign in to comment.
You can’t perform that action at this time.