Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by gethly

1 day ago

FYI, IDEs and editors too don't use "textarea". Contenteditable essentially makes the web browser work like editor does.

2 comments

gethly

Reply

mg  1 day ago

Contenteditable plus the CSS Custom Highlight API (which highlights ranges instead of elements) might indeed allow for a good solution. But I have not yet seen an editor that does that.

  • hyperhello  21 hours ago

    I built a prototype that does work. https://hypervariety.com/ScriptHighlighter/

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities