Dzień dobry.
Jak zarejestrować menu kontekstowe pluginu w TinyMCE? W configu do całego Tiny jest pole
contextmenu: 'nazwa-pluginu',
Ale z różnych względów chcemy uniezależnić się od specjalnego configa. Jest plugin Image
który ma menu contextowe i nie ma tej zmiennej.
Jest tam takie coś:
editor.ui.registry.addContextMenu('image', { update: element => isFigure(element) || isImage(element) && !isPlaceholderImage(element) ? ['image'] : [] });
Zrobiłem coś podobnego ale nie działa:
editor.ui.registry.addContextMenu('accord', {
update: (element) => 'accord'
});
(accord
to nazwa mojego pluginu)
Proszę o wskazówki
Dzięki