Search code examples
javascriptjquerycodemirror

How to get jquery not Javascript hint for autocompletion in CodeMirror?


I am working on online JS IDE using CodeMirror in php.

in CodeMirror JavaScript autocompletion hint is available.

I want to show Jquery hint on Javascript mode.

It is possible in CodeMirror?


Solution

  • Tern has both a CodeMirror plugin and a set of type definitions for jQuery. Putting those pieces together should give you the result you want, though some programming is required to integrate the Tern plugin.