Replies: 2 comments
-
This is going to be a big comment. So, I've been trying to find a way to stylize and remove a link icon that is rendered for each element of type: 'embeddable' in excalidraw file. The workaround that I've managed to accomplish is complicated and by all means is not a good solution. But it worked for me, so I will do my best to describe steps to reproduce it, so other users may do the same, and developers - get an idea of a possible feature implementation. First: while the link component itself cannot be seen from Dev Tools Elements view - there is a tooltip component To find the code that renders embeddable link, I decided to put a breakpoint on a tooltip element: With breakpoint added, each hover on embbeddable link will lead us to this line of code in one of js files: This file seems to be a minified excalidraw build, and the reason I think so is because after looking through the sources of both obsidian-excalidraw-plugin and excalidraw itself - I've found the function responsible for embeddable link render, which is This part can be found in the same file breakpoint has stopped in by searching ( Put a breakpoint here (it is important for a breakpoint to be in this function before That new breakpoint will be triggered on zoom, so either pitch your trackpad or do a So, the workaround is to redefine e.drawImage = ()=>{}
As you should be able to see at this point, there is nothing rendered where the embeddable link previously was. How to use it:
If you remove all breakpoints and zoom again - links will reset back to normal.
For the developers: I won't be able to make it myself for the time being, and I hope these notes will help whomever will decide to implement it. |
Beta Was this translation helpful? Give feedback.
-
However, you might prefer easy way and set Truly, hours of debuggind can save you minutes of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I know that I can change how links are displayed in the sketches via the plugin's settings - and I like that and want to use it. But at the moment I also get the Obsidian-default "external link" icon attached to links (at the top right edge). Anyone knows how to get rid of it just for Excalidraw drawings?
If I was to do it Obsidian-wide, I could use the following CSS but that is not what I am after.
Thanks, any help is much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions