click a source line: move the caret there click it again, ENTER, or EDIT: type that line up / down: move the caret ADD: insert a line after the caret and type it DEL: delete the caret line DOC: cycle the three demo documents click in the preview: jump the caret to the block you clicked The preview follows the caret automatically — there is no second scrollbar, because every block records the source line it came from, so the caret is the only navigation either pane needs. Clicking the preview runs that mapping backwards.
A markdown editor with a live preview: headings, paragraphs with lazy continuation, nested ordered and unordered lists with hanging indents, blockquotes, fenced code, horizontal rules and tables. THE HARD PART IS MEASUREMENT, NOT PARSING. You cannot wrap a line without knowing how wide it is, and Scratch will not tell you. So the text is drawn from a glyph atlas of 570 costumes with a compile-time table of per-character advance widths, and layout measures every word against that table before it decides where the line breaks. Wrapping was verified numerically across all three demo documents: zero overflows, with the longest line landing 1.1px short of the 236px column. Every block records the source line it came from, so the preview can follow the caret automatically and clicking the preview can jump the caret back. That mapping is why there is only one scrollbar instead of two panes you have to keep in sync yourself. HONEST LIMITATIONS: editing is line-based rather than free-form, ASCII only, no bold-italic combined, table alignment markers are parsed but ignored, and there are no images or inline HTML. All original - code, art and sound. See Inside is open.