Skip to content

Commit

Permalink
Allow tabIndex to be passed into editor (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjulivan authored Apr 12, 2024
1 parent adb4a7d commit c2679d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/ts/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface IProps {
value: string;
init: EditorOptions & Partial<Record<'selector' | 'target' | 'readonly' | 'license_key', undefined>>;
tagName: string;
tabIndex: number;
cloudChannel: Version;
plugins: NonNullable<EditorOptions['plugins']>;
toolbar: NonNullable<EditorOptions['toolbar']>;
Expand Down Expand Up @@ -180,7 +181,8 @@ export class Editor extends React.Component<IAllProps> {

return React.createElement(tagName, {
ref: this.elementRef,
id: this.id
id: this.id,
tabIndex: this.props.tabIndex
});
}

Expand All @@ -189,7 +191,8 @@ export class Editor extends React.Component<IAllProps> {
ref: this.elementRef,
style: { visibility: 'hidden' },
name: this.props.textareaName,
id: this.id
id: this.id,
tabIndex: this.props.tabIndex
});
}

Expand Down
1 change: 1 addition & 0 deletions src/main/ts/components/EditorPropTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export const EditorPropTypes: IEditorPropTypes = {
onEditorChange: PropTypes.func,
value: PropTypes.string,
tagName: PropTypes.string,
tabIndex: PropTypes.number,
cloudChannel: PropTypes.string,
plugins: PropTypes.oneOfType([ PropTypes.string, PropTypes.array ]),
toolbar: PropTypes.oneOfType([ PropTypes.string, PropTypes.array ]),
Expand Down

0 comments on commit c2679d0

Please sign in to comment.