mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 10:29:48 +02:00
Merge branch 'master' of github.com:ianstormtaylor/slate
This commit is contained in:
@@ -80,7 +80,7 @@ class LargeDocument extends React.Component {
|
||||
<Editor
|
||||
placeholder={'Enter some plain text...'}
|
||||
schema={schema}
|
||||
spellcheck={false}
|
||||
spellCheck={false}
|
||||
state={this.state.state}
|
||||
onChange={this.onChange}
|
||||
/>
|
||||
|
@@ -35,6 +35,7 @@ class Content extends React.Component {
|
||||
*/
|
||||
|
||||
static propTypes = {
|
||||
autoCorrect: React.PropTypes.bool.isRequired,
|
||||
className: React.PropTypes.string,
|
||||
editor: React.PropTypes.object.isRequired,
|
||||
onBeforeInput: React.PropTypes.func.isRequired,
|
||||
@@ -98,6 +99,7 @@ class Content extends React.Component {
|
||||
return (
|
||||
props.className != this.props.className ||
|
||||
props.schema != this.props.schema ||
|
||||
props.autoCorrect != this.props.autoCorrect ||
|
||||
props.spellCheck != this.props.spellCheck ||
|
||||
props.state != this.props.state ||
|
||||
props.style != this.props.style
|
||||
@@ -747,6 +749,7 @@ class Content extends React.Component {
|
||||
onKeyUp={this.onKeyUp}
|
||||
onPaste={this.onPaste}
|
||||
onSelect={this.onSelect}
|
||||
autoCorrect={props.autoCorrect}
|
||||
spellCheck={spellCheck}
|
||||
style={style}
|
||||
role={readOnly ? null : (role || 'textbox')}
|
||||
|
@@ -61,6 +61,7 @@ class Editor extends React.Component {
|
||||
*/
|
||||
|
||||
static propTypes = {
|
||||
autoCorrect: React.PropTypes.bool,
|
||||
className: React.PropTypes.string,
|
||||
onBeforeChange: React.PropTypes.func,
|
||||
onChange: React.PropTypes.func,
|
||||
@@ -86,6 +87,7 @@ class Editor extends React.Component {
|
||||
*/
|
||||
|
||||
static defaultProps = {
|
||||
autoCorrect: true,
|
||||
onChange: noop,
|
||||
onDocumentChange: noop,
|
||||
onSelectionChange: noop,
|
||||
@@ -253,6 +255,7 @@ class Editor extends React.Component {
|
||||
state={this.getState()}
|
||||
className={props.className}
|
||||
readOnly={props.readOnly}
|
||||
autoCorrect={props.autoCorrect}
|
||||
spellCheck={props.spellCheck}
|
||||
style={props.style}
|
||||
tabIndex={props.tabIndex}
|
||||
|
@@ -260,6 +260,7 @@ const Node = {
|
||||
return this
|
||||
.getTexts()
|
||||
.map(text => this.getClosestBlock(text.key))
|
||||
// Eliminate duplicates
|
||||
.toOrderedSet()
|
||||
.toList()
|
||||
},
|
||||
@@ -275,6 +276,9 @@ const Node = {
|
||||
return this
|
||||
.getTextsAtRange(range)
|
||||
.map(text => this.getClosestBlock(text.key))
|
||||
// Eliminate duplicates
|
||||
.toOrderedSet()
|
||||
.toList()
|
||||
},
|
||||
|
||||
/**
|
||||
|
@@ -56,6 +56,7 @@ function clean(html) {
|
||||
$(el).removeAttr('data-offset-key')
|
||||
})
|
||||
|
||||
$.root().children().removeAttr('autocorrect')
|
||||
$.root().children().removeAttr('spellcheck')
|
||||
$.root().children().removeAttr('style')
|
||||
|
||||
|
Reference in New Issue
Block a user