Display form when double clicking on a string

Is there a way to display a form (as shown in the attachment) when we select a string in CodeMirror editor. I am open to use context menu or double clicking on the selected string.

Expected behavior:
On double-click or right click on a string, code mirror should pop up a form/dialog where we can collect additional inputs from the user using drop down and text area

Yes, this should be possible. Register event handlers that notice the double click and then run your logic (you can use posAtCoords to figure out where the click landed).

Thanks. Another related question, Is there a way to have a collapsible split view on the CodeMirror editor ? (i.e From the above screen shots, when the user select line 7, we see should see “Edit resolver” button on the right. When the user clicks that button, editor should open up (split-view on line 7) and show the resolver related ui elements and when the user clicks “Done” button the editor should collapse/merge and show the original schema content ?

Sure, that should be doable.

@marijn Thanks for your quick reply. Can you point me to any API or documentation that I can use to achieve that collapsible split view(that I explained earlier) ?

Sorry, no, I don’t have the time to spare to work out exactly how your proposed interface works and sketch an implementation. Look through the examples and the guide, and if you run into specific problems or questions, feel free to ask.

@marijn, Thanks. I will look at code folding and other examples to implement split view.