apache / incubator-annotator

Apache Annotator provides annotation enabling code for browsers, servers, and humans.
https://annotator.apache.org/
Apache License 2.0
221 stars 38 forks source link

Don’t find/highlight text inside <textarea> elements (or other invalid parents for a <mark>). #131

Open Treora opened 2 years ago

Treora commented 2 years ago

Highlighting (using <mark> elements, as we do) text inside a <textarea> will make that text disappear. The higlighter should either fail or modify the given range if parts of it are within a textarea.

This could be generalised to any element where a <mark> element would not be permitted as a child.

reckart commented 2 years ago

Another case could be mathml sections or SVGs.

Treora commented 1 year ago

Yet another issue in this theme: table layout can be messed up by the added <mark> elements.