mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 18:39:51 +02:00
cleanup editor and content props
This commit is contained in:
@@ -36,15 +36,15 @@ class Content extends React.Component {
|
||||
static propTypes = {
|
||||
className: React.PropTypes.string,
|
||||
editor: React.PropTypes.object.isRequired,
|
||||
onBeforeInput: React.PropTypes.func,
|
||||
onChange: React.PropTypes.func,
|
||||
onKeyDown: React.PropTypes.func,
|
||||
onPaste: React.PropTypes.func,
|
||||
onSelect: React.PropTypes.func,
|
||||
readOnly: React.PropTypes.bool,
|
||||
onBeforeInput: React.PropTypes.func.isRequired,
|
||||
onChange: React.PropTypes.func.isRequired,
|
||||
onKeyDown: React.PropTypes.func.isRequired,
|
||||
onPaste: React.PropTypes.func.isRequired,
|
||||
onSelect: React.PropTypes.func.isRequired,
|
||||
readOnly: React.PropTypes.bool.isRequired,
|
||||
renderMark: React.PropTypes.func.isRequired,
|
||||
renderNode: React.PropTypes.func.isRequired,
|
||||
spellCheck: React.PropTypes.bool,
|
||||
spellCheck: React.PropTypes.bool.isRequired,
|
||||
state: React.PropTypes.object.isRequired,
|
||||
style: React.PropTypes.object
|
||||
};
|
||||
@@ -56,8 +56,6 @@ class Content extends React.Component {
|
||||
*/
|
||||
|
||||
static defaultProps = {
|
||||
readOnly: false,
|
||||
spellCheck: true,
|
||||
style: {}
|
||||
};
|
||||
|
||||
|
@@ -38,6 +38,7 @@ class Editor extends React.Component {
|
||||
renderDecorations: React.PropTypes.func,
|
||||
renderMark: React.PropTypes.func,
|
||||
renderNode: React.PropTypes.func,
|
||||
spellCheck: React.PropTypes.bool,
|
||||
state: React.PropTypes.object.isRequired,
|
||||
style: React.PropTypes.object
|
||||
};
|
||||
@@ -46,7 +47,8 @@ class Editor extends React.Component {
|
||||
onDocumentChange: noop,
|
||||
onSelectionChange: noop,
|
||||
plugins: [],
|
||||
readOnly: false
|
||||
readOnly: false,
|
||||
spellCheck: true
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -232,6 +234,7 @@ class Editor extends React.Component {
|
||||
readOnly={this.props.readOnly}
|
||||
renderMark={this.renderMark}
|
||||
renderNode={this.renderNode}
|
||||
spellCheck={this.props.spellCheck}
|
||||
state={this.state.state}
|
||||
style={this.props.style}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user