Skip to main content
Hi everyone! How i can add an application icon to the widgetContextMenu? By looking at the documentation, i tried the following code: miro.onReady(() => {
  miro.initialize({
    extensionPoints: {
      widgetContextMenu: {
        title: 'Hi',
        svgIcon: "<circle cx=\"12\" cy=\"12\" r=\"9\"></circle>",
      }
    }
  })
})

but in console i get the following error

However, I can do it in bottomBar if I replace “widgetContextMenu” with “BottomBar”.

Excellent, this is what I needed, thanks a lot!


And here’s an example app done by Pavol using such feature, might also be helpful: https://github.com/pavoltanuska/miro-estimate/blob/master/public/index.html#L21-L39

 


 

function run() {
miro.initialize({
extensionPoints: {
getWidgetMenuItems: (widgets) => {
return Promise.resolve({
tooltip: 'Hi',
svgIcon: icon24,
onClick: (widgets) => {
console.log('onClick', widgets)
}
})
}
}
})
}

miro.onReady(run)

Try this. Sorry for the formatting, dont get it to work.


Reply