How to use Docs Api to define a right-click menu in a word document and execute a specified callback function?

I want to achieve the following functions in the word interface of onlyoffice, but I can’t find the corresponding functions. Please guide me, thank you.

  1. Select a paragraph of text in word, right-click, and pop up a custom menu.
  2. Click one of the custom menu items in the custom menu, and be able to send the selected text back to the backend service.
  3. After the return is successful, replace the selected text with the returned content.

Hello @alex.song

Unfortunately, there is no way to customize context menu (right-click menu) items.