EditContext (custom text input)
Lets canvas or custom editors receive IME and keyboard text input without a hidden text box.
In one line
Can run its own text editor that still gets your keyboard and emoji input
Lets canvas or custom editors receive IME and keyboard text input without a hidden text box.
A page can run its own editor surface and still get full IME and emoji input. It sees the same typing data as a normal text field, so the privacy picture is unchanged.
What it can and can't do
What the user does: You click into a custom editor and type
It can
- Receive your typing, including foreign language and emoji input
- Show its own editor without a hidden text box
- Support custom editors like online documents and design tools
It cannot
- See typing outside the page or editor
- Collect more than a normal text box would
- Work in Firefox or Safari
How it differs between platforms: Chrome, Edge and Samsung Internet support it. Firefox and Safari do not.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 121 | 2024-01-23 | None |
| Edge | Supported | 121 | 2024-01-25 | None |
| Firefox | Not supported | Not available | Not listed | None |
| Safari | Not supported | Not available | Not listed | None |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Supported | 121 | 2024-01-23 | None |
| Samsung Internet | Supported | 25.0 | 2024-04-24 | None |
How a site asks for it
| API | new EditContext(); element.editContext = ctx; textupdate, textformatupdate, characterboundsupdate |
| Browser compat keys | api.EditContext |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | While attached |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Same-document only |
Typical flow
- Create EditContext and attach to an element
- Focus the element
- textupdate events deliver composed text
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Chromium only: Chrome 121 and Edge 121; Firefox and Safari not shipped
- Page must report selection and character bounds so the IME window can align
- Does not expose text typed elsewhere
- Still needs focus on the element to receive input
The story
What it is
Lets a page that draws its own text editor still get your typing, accents and emoji.
For you
You type in a big document or canvas and everything still works, including Chinese or Japanese input, accents and emoji. You do not see how it is built. It may feel smoother than older web editors.
For makers
Makers of big editors want full control of how text looks and moves, and may draw it on a canvas for speed. This API gives them the same input support as a normal box without hacks.
Where you see it
| Type | Example | Apps |
|---|---|---|
| productivity | An online word processor draws its pages on a canvas and uses it to accept typing from any language. | Google Docs, Word for the web |
| creative | A web design or whiteboard tool lets you type directly on a canvas text object. | Figma, Miro, Excalidraw |
| games | A browser game with a custom chat or name entry window gets IME support for players typing in Japanese or Korean. | None named |
| developer | A code editor in the browser keeps its own cursor and highlighting while still handling input methods. | Monaco, VS Code for the Web |
| education | A math or notation tool types into a custom surface and still reads emoji and symbols. | None named |
| accessibility | A custom editor that supports IME helps people who type in languages that need composition. | None named |
Risks
- Sees typing in the editor
- Little else
What the platform says
- Google Chrome: EditContext API. Chrome introduced it for web editors that draw their own text surface, so they can support IME, emoji and spellcheck-like input.
Good uses and abuse
Legitimate uses
- Canvas based editors (Figma-like text, Docs)
- Games with chat
Known abuse
- Same keystroke capture risk as normal inputs, harder for password managers to detect
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2024-01, Chrome 121: EditContext API ships
Related capabilities
Related
- Keyboard and IME events. Can see each key you press while the page has focus
- Editable regions and spellcheck. Can turn parts of a page into a text editor you can type in
Sources
How well checked: Based on official documentation.