logoalt Hacker News

knallfroschlast Monday at 5:21 PM2 repliesview on HN

One simply needs the Highlight API. I held back, but now even Firefox ESR supports it.

https://developer.mozilla.org/en-US/docs/Web/API/Highlight

All the trickery vanishes and you get first-class CSS support.


Replies

bakkotinglast Monday at 9:30 PM

And there's an open issue for that already: https://github.com/bearcove/arborium/issues/62

mglast Tuesday at 5:14 AM

That works on the text inside a textarea? Is there a demo showcasing this somewhere?