Skip to content
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

Add open-menu-xxx event bus for plugins #8617

Closed
leolee9086 opened this issue Jun 25, 2023 · 2 comments
Closed

Add open-menu-xxx event bus for plugins #8617

leolee9086 opened this issue Jun 25, 2023 · 2 comments
Assignees
Milestone

Comments

@leolee9086
Copy link

leolee9086 commented Jun 25, 2023

In what scenarios do you need this feature?

为了实现向链接、图片等行内元素右键菜单添加自定义项,需要能够捕捉这些元素的右键点击事件。

在实现单个图片上传图床、设置文档内某图片为文档头图、复制链接为链接卡片等等操作时可能需要。

Describe the optimal solution

与现在的click-editorcontent等事件类型一致即可,例如contextmenu-editorcontent,在事件的detail中应该能够获取触发事件的元素和对应的自定义菜单对象

Describe the candidate solution

No response

Other information

No response

@Vanessa219 Vanessa219 changed the title 为插件的事件总线添加编辑元素右键菜单事件 Add open-menu-xxx event bus for plugins Jun 29, 2023
@Vanessa219
Copy link
Member

Vanessa219 commented Jun 29, 2023

  • open-menu-blockref
  • open-menu-fileannotationref
  • open-menu-tag
  • open-menu-link
  • open-menu-image
  • open-menu-av
  • open-menu-content

@Vanessa219 Vanessa219 self-assigned this Jun 29, 2023
@Vanessa219 Vanessa219 added this to the 2.9.4 milestone Jun 29, 2023
Vanessa219 added a commit that referenced this issue Jun 29, 2023
Vanessa219 added a commit that referenced this issue Jun 29, 2023
Vanessa219 added a commit to siyuan-note/petal that referenced this issue Jun 29, 2023
@leolee9086
Copy link
Author

好耶 感谢V姐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants