1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-07-31 04:20:26 +02:00

cleanup plain text example

This commit is contained in:
Ian Storm Taylor
2016-07-13 14:57:20 -07:00
parent 3d33ab3da2
commit d8e2f371d2

View File

@@ -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 })
}
}
/**