Comments (8)
For me it also breaks dataview behavior as it substitutes global app
object with some of your stuff (I see it as Editor
now), so app.plugins
is no more available. I rely on the following lines in my dataviewjs code:
const {getPropertiesInFile} = app.plugins.plugins["metaedit"].api;
const {createButton} = app.plugins.plugins["buttons"];
So after installing your plugin it stopped working.
from tldraw-in-obsidian.
I think you're on to something! Thank you! I'll look into this as soon as I can.
from tldraw-in-obsidian.
Hmm I looked into this all morning but not making much progress. I think it has to do with the custom view I made for TLDraw and/or the file cache but I'm really sure yet. Apparently switching to the TLDraw View breaks the Calendar plugin, as well as Excalidraw which I didn't notice before. What plugins are you using? It looks like Omnisearch and Calendar, but I can't pick out what that last plugin that's throwing the error is.
from tldraw-in-obsidian.
After doing some more debugging, I think I've narrowed it down to the actual Tldraw react component. Commenting out the <Tldraw ... />
component stops my plugin from breaking the other plugins and even adding it back in with no props will cause the issues again. This leaves me to believe that its not any of the code that manages the view mode switching but rather the component itself that's the issue. If anyone more experienced with the Obsidian API can weigh in on this, that'll be helpful. If I am right then the only solution for this would be to switch to another version of TLDraw or fork TLDraw and try to fix it myself.
from tldraw-in-obsidian.
Hey I think I fixed the issue, lemme know if you guys are still having problems. The most updated release is 1.0.3.
EDIT: nvm the issue still persist if you open Obsidian and your workspace has more than one tab open, and one of those tabs has a TLDraw file opened and that tab is not the active tab/file.
from tldraw-in-obsidian.
So after diving a bit into the Tldraw source code, I found the line that causes Tldraw to replace the global app object here. So I'll be working on finding ways to fix this and may also open an issue on Tldraw's repository. Any suggestions on an approach are welcomed.
from tldraw-in-obsidian.
For me it works now, thanks. I tried to reproduce your case, but everything seems to be fine.
from tldraw-in-obsidian.
I found a way to patch that one line of code in the Tldraw repo using patch-package that will completely eliminate this problem. I'll also create an issue on the Tldraw repo but we'll use patch-package until they fix the issue. And finally, I'll update the release and close this issue once I push out the changes in a day or two because I have some related changes I still need to finish :)
from tldraw-in-obsidian.
Related Issues (19)
- Failed to load HOT 2
- Inline drawing in Markdown file HOT 1
- Release on Community Plugins HOT 8
- Hardware eraser support
- Touch produces penstroke in pen mode
- Embed shows souce json code HOT 2
- Thanks a lot HOT 1
- Great addition
- Issues with Dark Mode Persistence and Importing from tldraw.com in tldraw HOT 2
- Ability to import an exported .tldr file HOT 1
- Installation instructions are outdated HOT 1
- Tool menu in upper right does not require clicking to select color
- [FR] Change toolbar position
- Edit drawing with another editor
- Command to embed into current document HOT 1
- Can't copy and past tldraw-web ↔ tldraw-obsidian HOT 1
- Please don't use online fonts - Download them once HOT 1
- Add settings option to allow maintaining current tool selection after tool use.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tldraw-in-obsidian.