Skip to content

handleTab implementation not working #27

@heretoinfinity

Description

@heretoinfinity

I copied the code as is in the readme to create an Editor component but the tab key did NOT indent but rather shifted focus. Is there something I am missing? The code is pasted below for easy reference:

handleTab = (evt) => {
    const { editorState } = this.state;
    if (!CodeUtils.hasSelectionInBlock(editorState)) return 'not-handled';

    this.onChange(CodeUtils.handleTab(evt, editorState));
    return 'handled';
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions