Segmentation / word count TipTap open

TipTap word count treats a whole CJK paragraph as 1 word / 1 min read

Editor footer treats a whole CJK paragraph as one word and one minute read

emdash · emdash-cms/emdash

Symptom

The editor footer's word count and reading time come from TipTap's CharacterCount, whose default wordCounter splits on spaces. CJK scripts have no spaces between words, so a long Japanese or Chinese draft shows "1 word" and "1 min read" even though the published page, which already counts CJK separately, reports the correct time.

Minimal repro
Type a CJK paragraph into the editor; CharacterCount's default text.split(' ') returns 1, so the footer reports 1 word and 1 min read.
Fix

Configure CharacterCount with a wordCounter that counts CJK characters individually, and derive reading time from the text using the same word/CJK split and rates (200 words/min, 500 CJK chars/min) as the published reading-time util, so the editor and the rendered page agree.

Fix PR → #emdash-readingtime-cjk-wordcount
← all 93 entries