How can i show hint when code written in a string


Hai everyone

I am new to the code mirror, I had a dought how can I get suggestions in codemirror when I write code in a string like

‘console.log("hai codemirror ") ;’

When I write code in a string like in above, on input changes I need to get suggestions of JavaScript code.

I need to restrict the user to enter single quote ’ in codemirror how can i

I am a beginner can anyone help in a detailed guide please

Thank you
Hopping early positive reply.