Thanks for the explanation. Very helpful. ![]()
Does api.attachWidgetAction have access to attrs (my guess is no since I tried with no luck). If no, how exactly would a post menu button action have access. Here’s an example of what I mean:
api.addPostMenuButton('drink-coffee', (attrs) => {
return {
action: 'drink-coffee',
icon: 'coffee',
className: 'drink-coffee',
title: 'Coffee',
data: {
'coffee-link': attrs.shareUrl
},
position: 'first'
};
});
So here we want the action drink-coffee to link to the data-coffee-link as defined in the addPostMenuButton. Since attachWidgetAction does not have access to attrs (assumingly), where would we put some good ol’ JS to link to the data-coffee-link.
Apologies for basically asking for a tutorial ![]()