Modifying context menus with an extension

Hi!

LibreOffice supports contextual menu customization since version 5.4 (or was it 5.3?). That’s great.

Now, I’d like to add menus entries to the Text contextual menu in Writer through the extension mechanism. These entries would connect to some macros of mine.

While I can attach a new entry in the menubar to some macro using an extension, while I can manually change the contextual menu by hand, I can’t find information about the xml items to specify in order to have a new contextual menu entry using an extension. Of course, I might have overlooked something…

Can anyone direct me to the right direction?

Thanks!