title: How to register a right-click menu for selected text in the OSX?
body: <p>I want to add an OSX <a href="https://en.wikipedia.org/wiki/Dictionary_(software)" rel="nofollow noreferrer">Dictionary</a> app-like menu feature that registers an action which is made available OS-wide via the right-click menu, e.g.</p>
  
  <p><a href="https://i.stack.imgur.com/yaQLLl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yaQLLl.png" alt="right-click menu"></a></p>
  
  <p>Similar to the Dictionary, the menu feature that I want would need to be available everywhere in the OS and needs to appear only when there is text selected.</p>