Re: [w3c/editing] Update spec draft, explainer, examples for EditContext (PR #355)

@alexkeng commented on this pull request.



> +            this.editContext.updateCharacterBounds(rangeStart, characterBounds);
+        }
+    }
+
+    // When user typing, EditContext will receive textupdate events,
+    // which can be used to update the editor's model.
+    editContext.addEventListener("textupdate", e => {
+        editingController.handleTextUpdate(e.updateRangeStart, e.updateRangeEnd, e.updatetext,
+                                        e.newSelectionStart, e.newSelectionEnd,
+                                        e.compositionStart, e.compositionEnd)
+    });
+
+    // EditContext will also receive textformatupdate event for IME decoration.
+    // Ex. thin/thick underline for the "phrase mode" in Japanese IME.
+    editContext.addEventListener("textformatupdate", e => {
+        editingcontroller.updateTextFormatsUpdate(e.getTextFormats());

good catch!

-- 
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/355#discussion_r736017199

Received on Monday, 25 October 2021 22:41:15 UTC