DEV Community

Discussion on: How would you build a Medium-esque highlighting feature?

Collapse
 
antonfrattaroli profile image
Anton Frattaroli

After finding some way to store it, use html diffing to convert location data after edits are saved. Here's an html diffing implementation i ported to vanilla js that could give you a start: github.com/frattaro/htmldiff.js

Overlapping might be a pain to code but should be doable. Maybe use data attributes on the wrapper tags.