Re: [w3c/editing] moving the explainer editing repo (#238)

marcoscaceres commented on this pull request.



> +|  keydown              | focused element    |  Space
+|  textupdate           | active EditContext |  (committed IME characters available in event.updateText)
+|  keyup                | focused element    |  ...
+|  compositionend       | active EditContext |
+
+Note that the composition events are also not fired on the focused element as the composition is operating on the shared buffer that is represented by the EditContext.
+
+### Externally triggered changes
+
+Changes to the editable contents can also come from external events, such as collaboration scenarios. In this case, the web editing framework may get some XHR completion that notifies it of some pending collaboartive change that another user has committed. The framework is then responsible for writing to the shared buffer, via the ```updateText()``` method.
+
+![external input](external_input.png)
+
+## API Details
+
+```focus``` is used to activate an EditContext and a way to tell the OS that the author wants advanced text input methods enabled and that the metadata required for suggestions, where text input UI should appear, what the input mode is, etc. should all come from this particular editContext instance. This will create a strong reference (internally) from document to that editContext. The typical owner of an editContext instance will be the web app or widget that needs to enable text input.

Nit on back-tick usage: 

```suggestion
`focus` is used to activate an EditContext and a way to tell the OS that the author wants advanced text input methods enabled and that the metadata required for suggestions, where text input UI should appear, what the input mode is, etc. should all come from this particular editContext instance. This will create a strong reference (internally) from document to that editContext. The typical owner of an editContext instance will be the web app or widget that needs to enable text input.
```

-- 
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/pull/238#pullrequestreview-376515942

Received on Wednesday, 18 March 2020 01:57:47 UTC