1

How can we identify text matching a certain string in Lexical editor and highlight it similarly to how the browser's find function works?

Ideally we would do so in a way that does not affect the serialized output of the editor (because search results shouldn't update the underlying document.)

I apologize for not including code in this question. Lexical is rather new and not widely used. The documentation is sparse and incomplete so I'm unsure how to begin with this.

I'd be very appreciative for even a suggestion for a semi-functional approach.

Example of desired result:

enter image description here

Slbox
  • 10,957
  • 15
  • 54
  • 106

0 Answers0