- From: Ian Storm Taylor <notifications@github.com>
- Date: Thu, 04 Oct 2018 16:01:24 +0000 (UTC)
- To: w3c/editing <editing@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/editing/issues/166/427074582@github.com>
> We discussed this earlier, and it turns out it's problematic for some browsers as they want to look at partially styled words as one word. So for example "**fi**ssh" (<strong>fi</strong>ssh). Their spellchecker will then either make "**fish**" or "fish" out of that. It's worse with elements that have some kind of meaning for the editor that the browser doesn't understand ( for example: fi<span class="selection-of-collaborator-14">ssh</span>). I still think if you constrain the problem to only operation on text nodes you end up with a better solution here that editors are more likely to be able to work with. For example, given this starting point: ```html <strong>fi</strong>ssh ``` If the browser decides it really needs to combine the letters under a single element, it can perform what amounts to a "remove" to erase `ssh` and an "insert" to insert `sh` into the `<strong>` element, ending with: ```html <strong>fish</strong> ``` (But it still hasn't modified or created any non text nodes.) But I think that's still not great. I think browsers should strive to not mess with which letters appear nested in which elements either even. Instead, in that case they should just do a diff to figure out they need to remove the extra `s`, and end up with: ```html <strong>fi</strong>sh ``` This would leave the DOM in the most initial-like state, and would be what editors expect a spellcheck to do. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/editing/issues/166#issuecomment-427074582
Received on Thursday, 4 October 2018 16:01:51 UTC