Re: [w3c/editing] Spec: Empty addressable content fields with placeholders (Issue #528)

johanneswilm left a comment (w3c/editing#528)

Call 2026-03-12:

> 08:06 <whsieh> issue: https://github.com/w3c/editing/issues/528
08:08 <whsieh> michael_aufreiter: most RTE use this approach. this proposes a standard for this behavior
08:08 <whsieh> michael_aufreiter: several issues reported earlier w.r.t. rendering caret on top of empty element with placeholder
08:09 <whsieh> q+
08:09 <whsieh> johanneswilm: looking for initial input on this?
08:09 <whsieh> michael_aufreiter: yes
08:10 <whsieh> whsieh: what exactly is a placeholder?
08:10 <whsieh> michael_aufreiter: ::before pseudo-element for instance
08:10 <whsieh> michael_aufreiter: (that's actually the most non-invasive way)
08:10 <whsieh> michael_aufreiter: we could come up with other ideas though
08:11 <whsieh> michael_aufreiter: want to have empty placeholders in the DOM that would be laid out in the same way as a real DOM element. and then once the caret moves into the placeholder the placeholder would disappear
08:11 <whsieh> michael_aufreiter: in my case we don't remove the placeholders when we go there
08:11 <whsieh> michael_aufreiter: but it depends on the use case
08:12 <whsieh> johanneswilm: would make elements generally addressible
08:12 <whsieh> johanneswilm: feels slightly hacky to put a random element in there
08:12 *** ragoulik ([~ragoulik@b6520e17.publics.cloak](mailto:~ragoulik@b6520e17.publics.cloak?Subject=Re%3A%20%5BMinutes%5D%20Editing%20WG%20-%202026-03-12&In-Reply-To=%3C868A5FCB-ECB2-4B50-85A6-FD5EEF40755F%40apple.com%3E&References=%3C868A5FCB-ECB2-4B50-85A6-FD5EEF40755F%40apple.com%3E)) has quit (ragoulik)
08:13 <whsieh> michael_aufreiter: for me, what often happens is I have an empty div that I make non-editable, inside an editable container
08:13 <whsieh> johanneswilm: this is about automatic placement of the caret in empty placeholder elements
08:14 <whsieh> Rakesh: we experimented with defining default height for such elements
08:14 <whsieh> Rakesh: the issue is that you can't otherwise click (hit-test) an empty placeholder
08:15 <whsieh> michael_aufreiter: good point, that's actually the reason for the BR — you really want the line-height there but keep it empty still
08:15 <whsieh> Rakesh: also we noticed this already works in FF
08:16 <whsieh> Rakesh: ...talking about bug we observed (not GH issue tho)
08:17 <whsieh> johanneswilm: maybe another concrete example: empty <i> or <b> where you don't want certain elements to be addressable, and that's why we would want that distinction

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/528#issuecomment-4215532199
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/editing/issues/528/4215532199@github.com>

Received on Thursday, 9 April 2026 15:43:22 UTC