Highlighting canvases
jacwright opened this issue · comments
It feels like there may be multiple modules that would want to highlight text. Right now I can think of:
- collaboration showing the selection of other authors
- search and replace feature to highlight found words
- user-highlighting feature
While we can use decorators to wrap these sections in spans, I found using this method can cause the text rendering to alter slightly and text to wrap differently. For example, in the word "View"
the "i"
is close to the "V"
. But when you add a span around the "V"
the "i"
separates itself slightly and can even cause the wrapping on the line to change so the last word ends up on the next line. This is very distracting when you are doing a Search/Find operation and the text is jumping around on the page as you type.
This highlighting canvas could be a separate module which other modules can take advantage of. It doesn't need to be added to view.
Most things have been moved out of core and into modules. Decorations is a module. This could be added as an additional module or added to Decorations. I will close for now, but it is something to think on.