Skip to main content

cursor-position-tracker

Tracks and manages cursor position across text inputs, rich text editors, and custom selection interfaces. Handles IME composition and RTL text.

소스 정보

저장소
Fadil369/Solutions
최근 소스 활동
2026년 4월 9일 00:36
감지된 SKILL.md 언어
영어
스타
1
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
Cursor Position Tracker
version
1.0.0
description
Tracks and manages cursor position across text inputs, rich text editors, and custom selection interfaces. Handles IME composition and RTL text.
author
workspace
activated
false
# Cursor Position Tracker Tracks and manages cursor position across text inputs, rich text editors, and custom selection interfaces. Handles IME composition and RTL text. ## Decision Framework ### When to Apply Use when: Rich text editors, custom input components, IME support needed, collaborative editing ### When NOT to Apply Don't use when: Simple form inputs with standard behavior ## Anti-Patterns ### 1. Breaking IME Composition ```javascript // BAD: Prevents character composition input.addEventListener('input', (e) => { formatText(); }); // GOOD: Wait for composition end let composing = false; input.addEventListener('compositionstart', () => composing = true); input.addEventListener('compositionend', () => { composing = false; formatText(); }); input.addEventListener('input', (e) => { if (!composing) formatText(); }); ``` ## Trigger Phrases - "Cursor position" - "Text selection" - "Rich text editor" - "IME support" - "Text input handling" ## Patterns ### Selection Manager ```javascript class SelectionManager { saveSelection() { const sel = window.getSelection(); if (sel.rangeCount > 0) return sel.getRangeAt(0).cloneRange(); return null; } restoreSelection(range) { if (!range) return; const sel = window.getSelection(); sel.removeAllRanges(); sel.addRange(range); } } ``` ## Integration - Works with: real-time-collaboration-engine, form-pattern-engine
GitHub에서 보기