```
import React, { Component } from "react";
import { render } from "react-dom";
import CodeMirror from "react-codemirror";
import "./style.css";
import "codemirror/lib/codemirror.css";

class App extends Component {
  constructor() {
    super();
    this.state = {
      name: "CodeMirror",
      code: "Hello world Code Mirror"
    };
  }

  updateCode(newCode) {
    this.setState({
      code: newCode
    });
  }

  render() {
    let options = {
      lineNumbers: true
    };
    return (
      <div>
        <p>Start editing to see some magic happen :)</p>
        <CodeMirror
          value={this.state.code}
          onChange={this.updateCode.bind(this)}
          options={options}
        />
      </div>
    );
  }
}

render(<App />, document.getElementById("root"));

```

I'm working on a tokenizer and want to highlight a specific token from the code.

How to underline or bold a specific token, like `world` text in this case?

Or is there any other code editor library which can highlight any substring given start and end index?