Roznoshchik / Lurnby

A tool for active reading and personal knowledge management
https://www.lurnby.com
BSD 3-Clause "New" or "Revised" License
681 stars 18 forks source link

Highlighting images and media doesn't work yet. #2

Closed Roznoshchik closed 2 years ago

Roznoshchik commented 2 years ago

Currently Lurnby's highlighting only works for text content. Ideally you should be able to highlight images, graphs, and charts.

The existing libraries all seem to rely on making a screenshot by recreating the DOM and I'm not positive if that would work in all use cases such as pdfs and the like.

In any case, would need to do a few things for that.

  1. Open up an option to take a screenshot instead of create a highlight in reader mode.
  2. Create a new db field for storing image location in the Highlight model.
  3. Change how the highlight displays if it's an image or if it's text.
Roznoshchik commented 2 years ago

Implemented this using rangy library and tinymce 🍡