Skip to content

Replace file menu item #303

Answered by rejetto
6elkir asked this question in Q&A
Jul 29, 2023 · 5 comments · 2 replies
Discussion options

You must be logged in to vote

the "menu" is already passed in current version. This is a more complete example:

HFS.onEvent('fileMenu', ({ entry, menu }) => {
  const index = menu.findIndex(x => x.icon === 'image')
  menu[index] = { label: "your feature" }
})

i didn't test it

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@6elkir
Comment options

Answer selected by 6elkir
Comment options

You must be logged in to vote
1 reply
@6elkir
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants