From d8e2f371d28ef4c2718a0f3cf867c95e2907d39a Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 13 Jul 2016 14:57:20 -0700 Subject: [PATCH] cleanup plain text example --- examples/plain-text/index.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) 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 }) - } - } /**