[csswg-drafts] [css-highlight-api] Allow Custom Highlights on `textarea`/`input[type="text"]` (#9971)

bramus has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-highlight-api] Allow Custom Highlights on `textarea`/`input[type="text"]` ==
Branching off from https://github.com/w3c/csswg-drafts/issues/9247, that had these comments about being able to use Custom Highlights inside of `textarea`/`input[type="text"]`:

> ([#](https://github.com/w3c/csswg-drafts/issues/9247#issuecomment-1696224019)) Then yeah, I suspect pushing on that part (being able to style ranges in a textarea and other inputs) might be the place to start, before we step to a higher level and build in some parsing libraries.

> ([#](https://github.com/w3c/csswg-drafts/issues/9247#issuecomment-1696246093)) Yeah, that sounds like a bug with the Highlight API that we should fix; definitely not a reason to design a whole other API.

> ([#](https://github.com/w3c/csswg-drafts/issues/9247#issuecomment-1697437128)) It's not obvious if it's a browser bug or an API bug. If you can create a range you should be able to set a highlight on it, as I understand the spec. Does anyone happen to know if you can create the desired range for the textarea?
> 
> As reference, we can certainly draw spelling and grammar markers in textarea.

Adding on to these comments, I recently received numerous requests from authors if Custom Highlights can be used on (mainly) a `textarea` element.

The developer need is there, so the question is if we need to add something to the spec that would allow this. Or does the spec already allow it, and it this purely a current oversight of implementers?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9971 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 16 February 2024 20:28:30 UTC