webcontainer-core icon indicating copy to clipboard operation
webcontainer-core copied to clipboard

Fix Bug on Sandbox APP - Controlling the canvas example

Open nyolamike opened this issue 5 months ago • 0 comments

Describe the bug

The sandox app example. The package for tldraw is outdated compared to the examples on the website So when one tries to do like the section Controlling the canvas, the toRichText function is not available in the package Then the demo fails to ender. For less experienced developers, and hobbist it can really be frustrating to quickly follow along.

Link to the blitz that caused the error

https://stackblitz.com/edit/vitejs-vite-j8hhg7xs?file=src%2FApp.tsx,package.json

Steps to reproduce

  1. Follow the instructions on https://tldraw.dev/quick-start
  2. And you are running the sand box at sandbox
  3. When you rich the section that is titled Controlling the canvas, thy use a toRichText function imported from import { Tldraw, toRichText } from 'tldraw' , this does not exist in the sandbox tldraw package used "tldraw": "^3.7.2" from the package.json file
Image

Expected behavior

I expect the sandbox example to be able to run atlist all the examples on the get started page, expecially the ones that dont involve realtime collaboration

So I expect the package.json file to have upto date versions of tldraw (This is the solution actually)

Parity with Local

Screenshots

No response

Platform

Browser name  = Chrome
Full version  = 138.0.0.0
Major version = 138
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 139556046,
  "usedJSHeapSize": 135096050,
  "jsHeapSizeLimit": 4294705152
}
Hash = 96435430

Additional context

No response

nyolamike avatar Jul 22 '25 19:07 nyolamike