Skip to content

Commit

Permalink
Merge pull request facebookarchive#11 from razh/link-example
Browse files Browse the repository at this point in the history
Fix logState calls in entity and link examples
  • Loading branch information
Isaac Salier-Hellendag committed Feb 22, 2016
2 parents 57e23c7 + 7170a40 commit 01f29c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/entity/entity.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
this.focus = () => this.refs.editor.focus();
this.onChange = (editorState) => this.setState({editorState});
this.logState = () => {
console.log(convertToRaw(this.state.editorState.toJS()));
const content = this.state.editorState.getCurrentContent();
console.log(convertToRaw(content));
};
}

Expand Down
4 changes: 3 additions & 1 deletion examples/link/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
'use strict';

const {
convertToRaw,
CompositeDecorator,
ContentState,
Editor,
Expand All @@ -55,7 +56,8 @@
this.focus = () => this.refs.editor.focus();
this.onChange = (editorState) => this.setState({editorState});
this.logState = () => {
console.log(convertToRaw(this.state.editorState.toJS()));
const content = this.state.editorState.getCurrentContent();
console.log(convertToRaw(content));
};

this.addLink = this._addLink.bind(this);
Expand Down

0 comments on commit 01f29c3

Please sign in to comment.