Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: