[editing-explainer] how does cE=typing handle autocorrect and spelling suggestions? (#37)

Have a look at issue #28 for the start of this discussion. Summary: we thought of limiting AC's effect to individual text nodes, @rniwa strongly opposed.

In my opinion contentEditable=typing should allow editor devs to leverage the UA/OS spellchecker and autocorrect. Also, the end-user's experience using such an editor should be similar to using a native rich text editor (same red squiggles, same OS-native popup balloons etc...)

We may have to spec an Autocorrect Intent that passes enough information for the editor dev to do the replacement operation themselves. The AC Intent would fire when:
- UA/OS decides to automatically correct text as the user types
- the user right-clicks on incorrect text and selects a replacement word from the popup menu.

If AC works across partially-styled text (as Safari currently does) then AC has the potential to delete DOM Elements, therefore the default behavior of this intent under cE=typing should be "do nothing".

As an editor dev I suspect I would be able to perform the correction in the DOM if given:
- the Range representing the original text content that is incorrect (the misspelled word)
- the unstyled, plain-text proper spelling as a simple character string.

This would be a bit more work for editor devs compared to text-node only AC, but the upsides are:
- more control for editor dev
- better UX for users

Thoughts?

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing-explainer/issues/37

Received on Tuesday, 23 December 2014 21:59:23 UTC