TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Inline Commenting with JavaScript. Looking for feedback

1 pointsby ggreinerover 11 years ago

1 comment

ceauteryover 11 years ago
I couldn&#x27;t get it to work in Chrome (&quot;keyCode of undefined&quot; errors). This is similar to something I wrote for Automattic recently.<p>I was pretty pleased with how I tackled annotations across block level elements. Essentially you find your range&#x27;s start and end containers, and if they match you can just range.surroundContents on them, but otherwise you surroundContents multiple times, once for the start container to its end, once for the end container, from its start until the end of the range, and then for every block element in the middle. Fun stuff.
评论 #6649671 未加载