2023-08-28_12-21-42.mp4
This Obsidian plugin allows users to use Tldraw, which is a tiny little drawing app, inside of Obsidian. Users can draw, plan, and use all of Tldraw's tools to augment their Obsidian experience. The data for each drawing is stored as a regular markdown file similar to the Excalidraw plugin meaning users will always have access to their data in plain markdown. Users have the option to switch between the Tldraw view or the markdown view in case they wish to include backlinks, tags, or any other elements to facilitate linking their drawings with their existing knowledge base.
TIP: You can toggle between the view modes, using the command palette, keyboard shortcuts, status bar toggle at the bottom right, file menu, and context menu. See the plugin settings tab for customization options as well.
The main goals of this plugin and repo is to keep up to date with the Tldraw's latest version and to add these features:
- Preview the drawing when a tldraw file is referenced in markdown.
- Add markdown notes into tldraw.
- Export and import tools.
Tldraw in Obsidian is now available on the official community plugins list!
- Here's a link that will take you to the plugin page:
obsidian://show-plugin?id=tldraw
(paste in your browser's address bar). - You can also find it by going into
Settings
>Community plugins
>Browse
>Type 'tldraw'
>Install
.
- Download
Obsidian42 - BRAT
from the community plugins. - Go into the settings for
Obsidian42 - Brat
and selectAdd Beta Plugin
- Copy and paste this repo:
https://github.com/holxsam/tldraw-in-obsidian
- Go back
Community plugins
and make sure to enableTldraw
- This is also the only way to get Tldraw in Obsidian on the mobile app as far as I know.
- Head over to releases and download a release (latest is recommended).
- Navigate to your plugin folder in your prefered vault:
VaultFolder/.obsidian/plugins/
- Create a new folder called
tldraw-in-obsidian
- Copy and paste over
main.js
,styles.css
,manifest.json
into the newly created/tldraw-in-obsidian
folder. - Make sure you enable the plugin by going into Settings > Community plugins > Installed plugins > toggle 'Tldraw'.
- Clone this repo or a fork to a local development folder.
- Place this folder in your
.obsidian/plugins
folder. - Install NodeJS, then run
npm i
in the command line under your repo folder. - Run
npm run dev
to compile your plugin frommain.ts
tomain.js
. - Make changes to the files in
/src
. Those changes should be automatically compiled intomain.js
andstyles.css
. - To refresh your changes, go to Settings > Community Plugins > disable and enable the plugin. You can also close your vault and then reopen it but that's more bothersome.
- Do not edit the
styles.css
file at the root of the repo. Edit the one in/src/styles.css
and the changes will be reflected automatically.
- This plugin is open to contributions. If you have a feature idea or want to report a bug, you can create an issue. If you are a developer wanting to fix a bug or add a feature to feel free to submit pull requests.
All Tldraw's code is theirs and I did not change any of it. Also shout out to the Excalidraw plugin for inspiration on how I should structure this Tldraw plugin.