Skip to content

MOJI_IMAGE_PLACEHOLDER

const MOJI_IMAGE_PLACEHOLDER: " " = '\u2003';

Defined in: mark.ts:45

Placeholder text for image mojis: a single U+2003 EM SPACE. Using exactly one code unit keeps the caret from landing inside the moji and makes deletion a clean single-unit operation. EM SPACE is chosen deliberately over U+FFFC (the OBJECT REPLACEMENT CHARACTER) because EM SPACE has a reliable ~1em advance in every font, so it renders a real, highlightable text cell — the moji shows the selection colour behind the image, just like ordinary text. U+FFFC has a zero advance in many fonts, leaving nothing for ::selection to paint. The space is invisible (whitespace, and non-collapsing) and the image is drawn on top by CSS (see mojis.css).