Skip to content

Any way of preventing tab to be use in the editor? #185

@bouteillerAlan

Description

@bouteillerAlan

I try this, but the tab key is captured anyway by the editor (the console.log is showed as well):

<CodeEditor
  value={localContent}
  language="md"
  placeholder="Please enter JS code."
  onChange={(e) => handleChange(e.target.value)}
  style={{ height: "calc(100vh - (40px + 111px))" }}
  onKeyDown={(event) => {      
    if (event.key === "Tab") {
      event.preventDefault();
      console.log("dddddddddd");
    }      
  }}
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions