Fnd string in document and scroll it into view

Suppose that I have sent a string to Codemirror. How do I programmatically search the current document for that string, then scroll to and highlight the matching text if it is found?

SearchCursor can help search for a string. EditorView.scrollIntoView is used for scrolling stuff into view. Highlighting will require your own decorating plugin.