Quick Start
Installation
Section titled “Installation”npm i writetrackpnpm add writetrackyarn add writetrackbun add writetrackCapture & Analyse
Section titled “Capture & Analyse”Attach WriteTrack to a textarea, capture a typing session, and render a full analysis scorecard:
import { WriteTrack } from 'writetrack';import { WtScorecard } from 'writetrack/viz';
// Register the scorecard web componentWtScorecard.register();
// Attach to any textarea, input, or contenteditable elementconst textarea = document.querySelector<HTMLTextAreaElement>('#response-field')!;const tracker = new WriteTrack({ target: textarea });tracker.start();
// On form submit: analyse the session and render a scorecarddocument .getElementById('response-form')! .addEventListener('submit', async (e) => { e.preventDefault(); tracker.stop();
const report = await tracker.getSessionReport(); document.querySelector<WtScorecard>('#scorecard')!.setData(report); });<form id="response-form"> <textarea id="response-field" rows="10" placeholder="Type your response..." ></textarea> <button type="submit">Submit</button></form><wt-scorecard id="scorecard"></wt-scorecard>That’s it — no server, no license key needed on localhost. The WASM analysis module loads automatically on the first call.
Next Steps
Section titled “Next Steps”- Vanilla JavaScript — Detailed guide for using WriteTrack without a framework
- React —
useWriteTrackhook with automatic lifecycle management - Vue —
useWriteTrackcomposable for Vue 3 - Next.js — Client-side integration with App Router and Pages Router
- Editor Plugins — Plugins for TipTap, CKEditor, ProseMirror, Quill, Lexical, Slate, and TinyMCE
- Analysis — Deep dive on the six analysis categories
- Licensing — Get a license key for production use
- API Reference — Complete method and type reference