Closed s4my closed 6 months ago
It's great to see you optimizing the code again. One line like editor = app.workspace.activeLeaf.view?.editor;
it using the deprecated activeLeaf is because some editors aren't of the Markdown type, such as the canvas and thino plugins. Especially with the thino plugin, recent updates have been made to ensure compatibility. I recommend downloading and try if it functions properly.
It's great to see you optimizing the code again. One line like
editor = app.workspace.activeLeaf.view?.editor;
it using the deprecated activeLeaf is because some editors aren't of the Markdown type, such as the canvas and thino plugins. Especially with the thino plugin, recent updates have been made to ensure compatibility. I recommend downloading and try if it functions properly.
I don't know what's the "the thino plugins", I didn't find anything on google? and in canvas, even the current version doesn't work, so I reverted those changes cause fixing that is a separate issue.
plugin url: https://obsidian.md/plugins?search=thino
plugin url: https://obsidian.md/plugins?search=thino
Like I said, you can merge this is commit as is (I reverted the changes to the deprecated version), and we leave that as a separate issue since personally the current version of the toolbar doesn't work in canvas, you should test it yourself.
This commit is pretty much a cleanup of unused imports, variables and functions for perf reasons. And I also in the process refactored the
editor
instances to get rid of the now obsolete APIWorkspace.activeLeaf
. If I deleted anything I shouldn't of, please do tell.