Skip to content

Commit

Permalink
Merge pull request zenoamaro#247 from zenoamaro/tabindex-property
Browse files Browse the repository at this point in the history
Added tabIndex prop for built-in editing area. Closes zenoamaro#232
  • Loading branch information
zenoamaro authored Aug 4, 2017
2 parents e76a13d + 2758893 commit 59abcc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,9 @@ import ReactQuill, { Quill, Mixin, Toolbar } from 'react-quill'; // ES6
`theme`
: The name of the theme to apply to the editor. Defaults to `snow`, Quill's standard theme. Pass `null` to use the minimal core theme. See the [docs on themes](#theme) for more information on including the required stylesheets.
`tabIndex`
: The order in which the editor becomes focused, among other controls in the page, during keyboard navigation.
`bounds`
: Selector or DOM element used by Quill to constrain position of popups. Defaults to `document.body`.
Expand Down
3 changes: 3 additions & 0 deletions src/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var QuillComponent = React.createClass({
value: T.oneOfType([T.string, T.shape({ops: T.array})]),
defaultValue: T.oneOfType([T.string, T.shape({ops: T.array})]),
placeholder: T.string,
tabIndex: T.number,
bounds: T.oneOfType([T.string, T.element]),
onKeyPress: T.func,
onKeyDown: T.func,
Expand Down Expand Up @@ -112,6 +113,7 @@ var QuillComponent = React.createClass({
'className',
'style',
'placeholder',
'tabIndex',
'onKeyPress',
'onKeyDown',
'onKeyUp',
Expand Down Expand Up @@ -324,6 +326,7 @@ var QuillComponent = React.createClass({

var properties = {
key: this.state.generation,
tabIndex: this.props.tabIndex,
ref: function(element) { self.editingArea = element },
};

Expand Down

0 comments on commit 59abcc6

Please sign in to comment.