-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin API custom.fn => custom.id in openTab #8944
Comments
萌佬的pr似乎可以搞定这个问题:#8927 |
目前没有办法识别,唯一标识需在初始化页签后才能获取的。再加一个 title 和 icon 的判断够用么? |
@Vanessa219 或者在data里默认就放个__plugin_name__: siyuan-plugin-xxx,类似这样呗。简单有效也算。一般人也用不到它,真有需要的也能用 |
openTab 是个方法,参数好像没法加上去。 |
或者考虑弄个新的api替换掉这个。对于标签页希望不仅能够插件openTab,同时也希望比如刷新之后插件能获取到自己有哪些tab实例之类的,让插件可以完全掌握它所掌控的tab。 另外openTab不是有fn嘛,可以在上面做做文章,看看能不能拿到想要的上下文 |
Vanessa219
added a commit
to siyuan-note/plugin-sample
that referenced
this issue
Aug 18, 2023
Vanessa219
changed the title
插件Tab的data相同时,识别错误无法打开对应插件的tab
Plugin API custom.fn => custom.id in openTab
Aug 18, 2023
Vanessa219
added a commit
to siyuan-note/petal
that referenced
this issue
Aug 18, 2023
Vanessa219
added a commit
to siyuan-note/plugin-sample
that referenced
this issue
Aug 18, 2023
88250
changed the title
Plugin API custom.fn => custom.id in openTab
Plugin API custom.fn => custom.id in openTab
Aug 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Can the issue be reproduced with the default theme (daylight/midnight)?
Could the issue be due to extensions?
Describe the problem
openTab时指定data为{}时,很容易与其他插件冲突,导致tab打不开。
源码调试时发现:
siyuan/app/src/editor/util.ts
Line 103 in 95c0955
用的是data作为判断依据,而没有进行插件名称的判断。按理说只有相同插件的相同data才考虑复用问题。
Expected result
不同类型tab的data相同时,不冲突导致无法打开
Screenshot or screen recording presentation
No response
Version environment
Log file
More information
No response
The text was updated successfully, but these errors were encountered: