tldraw-whiteboard

Creates programmatic whiteboard graphics with the tldraw SDK and extracts content from .tldr board files.

60|11|Updated Jun 15, 2026
One-click install
npx skills add https://github.com/matyasstoch/david-skills --skill tldraw-whiteboard-matyasstoch
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tldraw-whiteboard
Source: https://github.com/matyasstoch/david-skills/tree/main/skills/tldraw-whiteboard
Command: npx skills add https://github.com/matyasstoch/david-skills --skill tldraw-whiteboard-matyasstoch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tldraw, and includes references (resource) components.

What problem does it solve? Building visual whiteboard graphics for YouTube videos by hand is slow, and reading content out of an existing .tldr board file requires knowing its internal JSON structure. This Skill provides both an authoring workflow for programmatic shape creation and an inspection workflow for parsing board content. ## Core Features & Use Cases - Programmatic Authoring: Create text, geo, and arrow shapes via the tldraw Editor API in a React app, with sections offset horizontally for panning during recording. - Design Conventions: Enforces David's style rules such as xl uppercase headlines, color-coded concepts, point-based arrows, and zoom-to-fit on load. - Board Inspection: Parse .tldr JSON files, walk the ProseMirror richText tree, sort shapes by position, and isolate a single column of content. - Use Case: Given a video outline with three sections of bullets, generate a new src/videos/<video-name>.tsx file that renders color-coded sections side by side, then review it live at localhost:5173. ## Quick Start Ask the agent to build a tldraw whiteboard graphic from your video outline, or ask it to read the contents of a specific column from an existing .tldr file.

Frequently Asked Questions about tldraw-whiteboard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create tldraw shapes programmatically in React?▼

Use the onMount callback of the Tldraw component to get the Editor instance, then call editor.createShape with a type like text, geo, or arrow plus x, y, and props. Text content goes in props.richText using the toRichText helper.

How to extract text from a .tldr file?▼

A .tldr file is JSON with records at data['records']; filter for typeName == 'shape'. Text lives in props.richText as a ProseMirror tree, not props.text, so walk the tree to collect text nodes and sort shapes by (y, x) for reading order.

Why do tldraw arrows fail with boundShapeId?▼

Binding-based arrows using boundShapeId throw validation errors when created via createShape. Use point-based arrows instead by setting props.start and props.end as relative coordinates.

Can I load an existing .tldr file into the tldraw React app?▼

Yes, place the .tldr file in the public folder, fetch it on mount, and use parseTldrawJsonFile with getSnapshot and loadSnapshot from the SDK. Back up App.tsx first because load-on-mount replaces the current store.

Why do newline characters render literally in tldraw text shapes?▼

Newline characters render as literal \n in tldraw text shapes created programmatically. Use separate shapes for each line of text instead of embedding line breaks in a single richText value.