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