diff --git a/examples/plain-text/index.js b/examples/plain-text/index.js index 54a2797f2..9e56dcfdb 100644 --- a/examples/plain-text/index.js +++ b/examples/plain-text/index.js @@ -3,7 +3,6 @@ import { Editor, Plain } from '../..' import React from 'react' import initialState from './state.json' - /** * The plain text example. * @@ -22,6 +21,16 @@ class PlainText extends React.Component { state: Plain.deserialize(initialState) }; + /** + * On change. + * + * @param {State} state + */ + + onChange = (state) => { + this.setState({ state }) + } + /** * Render the editor. * @@ -38,17 +47,6 @@ class PlainText extends React.Component { ) } - /** - * On change. - * - * @param {State} state - */ - - onChange = (state) => { - console.log('Content:', Plain.serialize(state)) - this.setState({ state }) - } - } /**