iOS text editing, on the web · 웹에서도 아이폰처럼

Text that feels like a phone.

Tap anywhere to drop the caret and watch it glide over. Press and hold to pick up the loupe, then slide through the words. Double-tap to select, and drag the handles across lines.

아무 곳이나 눌러 커서를 놓아 보세요. 꾹 누르면 돋보기가 나오고, 두 번 누르면 단어가 선택됩니다. 손잡이를 끌어 여러 줄을 골라 보세요.

tap placehold loupedouble-tap selectdrag handles

Glide

The caret is drawn by the page, not the browser, so it springs between positions and blinks the soft iOS way.

커서가 스프링처럼 미끄러지고 부드럽게 깜빡입니다.

Morph

Selection boxes grow out of the caret, one per line, and fold back into it when you tap away.

선택 영역이 커서에서 자라나고 다시 접힙니다.

Handles + loupe

Lollipop handles you can drag. Hold or drag and a magnifier shows the caret and selection up close.

손잡이를 끌거나 꾹 누르면 돋보기가 나옵니다.

Edit menu

Cut, Copy, Paste, Select All, in English or Korean. Works with the system clipboard, with a fallback.

오려두기 · 복사하기 · 붙여넣기 · 전체 선택.

Use it

import { caret } from './caret.js'

const c = caret(document.querySelector('[contenteditable]'), {
  tint: '#0a84ff',   // caret, handles, selection
  loupe: 'glass',    // 'glass' | 'flat' | 'off'
  menu: true,        // Cut · Copy · Paste · Select All
  glide: true,       // spring between positions
  lang: 'auto',      // 'en' | 'ko' | 'auto'
})
c.set({ tint: '#bf5af2' })   // change anything live
c.destroy()

One file, no dependencies, MIT. Works with mouse, touch and keyboard, in Chrome, Safari and Firefox. Korean input works as usual.