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:
@@ -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 })
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user