Skip to Content
Platform.Ontology

EditContext (custom text input)

Lets canvas or custom editors receive IME and keyboard text input without a hidden text box.

Works without askingTyping and clipboardTextWeb browsersWhile you use it

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

BrowserStatusFirst versionReleasedNote
ChromeSupported1212024-01-23None
EdgeSupported1212024-01-25None
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported1212024-01-23None
Samsung InternetSupported25.02024-04-24None

How a site asks for it

APInew EditContext(); element.editContext = ctx; textupdate, textformatupdate, characterboundsupdate
Browser compat keysapi.EditContext
How access is grantednone
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)No
Needs a user gestureNo
Activationnone
How long it lastsWhile attached
How to take it backNothing to revoke (no permission is stored)
Inside an iframeSame-document only

Typical flow

  1. Create EditContext and attach to an element
  2. Focus the element
  3. 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

TypeExampleApps
productivityAn online word processor draws its pages on a canvas and uses it to accept typing from any language.Google Docs, Word for the web
creativeA web design or whiteboard tool lets you type directly on a canvas text object.Figma, Miro, Excalidraw
gamesA browser game with a custom chat or name entry window gets IME support for players typing in Japanese or Korean.None named
developerA code editor in the browser keeps its own cursor and highlighting while still handling input methods.Monaco, VS Code for the Web
educationA math or notation tool types into a custom surface and still reads emoji and symbols.None named
accessibilityA 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

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2024-01, Chrome 121: EditContext API ships

Sources

How well checked: Based on official documentation.

On this page