highlight / mark the text in @uiw/react-codemirror

I want to mark the text in codemirror react from a chat number to another char number like
From char 5 to 9 should mark the text in that range
I am using @uiw/react-codemirror package for codemirror in react.

Use decoration:

https://codemirror.net/examples/decoration/