[READ-ONLY] Mirror of https://github.com/FoxxMD/tldraw-selfhosted. A dockerized, selfhostable version of multiplayer tldraw
docker tldraw whiteboard
0

Configure Feed

Select the types of activity you want to include in your feed.

Use selfhosted assets

+12
+1
package.json
··· 49 49 "@fastify/cors": "^11.0.1", 50 50 "@fastify/static": "^8.2.0", 51 51 "@fastify/websocket": "^11.0.1", 52 + "@tldraw/assets": "^4.0.2", 52 53 "@tldraw/sync-core": "4.0.2", 53 54 "fastify": "5.4.0", 54 55 "unfurl.js": "^6.4.0",
+4
src/client/pages/Room.tsx
··· 7 7 Tldraw, 8 8 uniqueId, 9 9 } from 'tldraw' 10 + import {getAssetUrlsByMetaUrl} from '@tldraw/assets/urls' 10 11 import { useParams } from 'react-router-dom' 11 12 import { ReactNode, useEffect, useState } from 'react' 13 + 14 + const assetUrls = getAssetUrlsByMetaUrl(); 12 15 13 16 let WORKER_URL = import.meta.env.VITE_WORKER_URL ?? 'http://localhost:5858'; 14 17 if(import.meta.env.MODE === 'production') { ··· 35 38 // we can pass the connected store into the Tldraw component which will handle 36 39 // loading states & enable multiplayer UX like cursors & a presence menu 37 40 store={store} 41 + assetUrls={assetUrls} 38 42 deepLinks 39 43 onMount={(editor) => { 40 44 // @ts-expect-error
+7
yarn.lock
··· 1463 1463 "@tiptap/extension-text-style" "^2.26.1" 1464 1464 "@tiptap/pm" "^2.26.1" 1465 1465 1466 + "@tldraw/assets@^4.0.2": 1467 + version "4.0.2" 1468 + resolved "https://registry.yarnpkg.com/@tldraw/assets/-/assets-4.0.2.tgz#7344c3a6e8ee33c48645a7a7fb1bc681f78c13ba" 1469 + integrity sha512-vA7M8V47iUqC7CMIezKtNLk4jP3y5a7FBOz9B4MEIkTAQ+Qqm/NHz8CALgtFdMqDthcFo7ltGrgFyIoxsfrZXQ== 1470 + dependencies: 1471 + "@tldraw/utils" "4.0.2" 1472 + 1466 1473 "@tldraw/editor@4.0.2": 1467 1474 version "4.0.2" 1468 1475 resolved "https://registry.yarnpkg.com/@tldraw/editor/-/editor-4.0.2.tgz#d350e78471acb246b9a42f73019115980e4f7fb2"