Re: [w3c/editing] Contenteditable re-creating deleted children when it shouldn't (Issue #468)

Hmm, prohibiting it breaks the traditional behavior. Empty inline elements are not visible for users. Therefore, for avoiding unnecessary inline empty elements to stay, builtin editors need to clean it up as soon as possible. (E.g., if empty inline elements are stay, they need to be cleaned up when `blur`, etc.

Firefox supports `document.execCommand("removeFormat")` to clear the pending (cached) styles, but it seems that Chrome does not support (I'm not sure Safari, I cannot check it right now). It might be reasonable to add a new API to clear or disable caching inline styles. (`document.execCommand("removeFormat")` forcibly forgets current style at caret too.)

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

Message ID: <w3c/editing/issues/468/2387814470@github.com>

Received on Wednesday, 2 October 2024 07:36:20 UTC