Ah yes I failed to see that as @pmario said, the API does not support textarea and input (yet) - I tought that this could work on any selectable text. Yes, as of now this won’t be easy to use it for tiddlywiki, I can see how complicated this can get ![]()
The limited styling options is a bummer
Not having pointer event on the highlighted text is less of an issue, as code mirror do not provide custom tooltip either (or at least not the default version), and while not ideal the (temporary) loss of color highlight on highlighting a text could be acceptable (for me) if this approach would result in improved performances compared to codemirror.
Note that firefox DOES support the API, but only on nightly for now :
Therefore the odds that this will get better support soon (?) are pretty good, or at least I hope so.
In any case, even if it’s not ready yet (I agree, firefox not supporting it is definitively a deal breaker), I think it’s worth keeping an eye on this tech
That being said, if it’s tiny enough this could be a nice progressive enhancement for tiddlywiki to enable syntax highlighting on stylesheet preview for example, chromium and webkit based users benefiting first, then firefox users once the feature is fully implemented.
PS: Once this api become better supported, it will probably be usefull for the dynannotate plugin too, here’s a demo for a custom search highlighter: Custom Highlights demo (codepen.io)
