How I can do the context sensitive menu for example in codemirror?

I am using codemirror5.1 , I need to make context sensitive menu for example in codemirror , so can any body provide me with example How to make context sensitive menu for example in codemirror ??
Edit : I want to Edit the context of context sensitive menu by add event to it for example I want to add to the menue the word (show sample) and when I press on it then an event fired, so can I do it or Not ?
Thanks in advance