Request for integration help

Hello. I am struggling to integrate CodeMirror into an existing application. I want to provide advanced SQL editor to users. Among the problems I am having -

  • Syntax highlighting is not happening
  • in SQL gets converted to > when application gets user’s SQL from CM

THANKS for any tips!

Correction: > in SQL gets converted to & g t ;

Check whether you have loaded mode/sql/sql.js, before creating the editor, and set the mode option correctly.

The HTML escaping (>) isn’t done by CodeMirror. That’s happening in some other layer of your application.

Hello and thanks for the reply. Please see http://elisokal.com/tmp/cm1.png (screenshot) for confirmation that sql.js is loaded and to get an idea of the application. My initialization for CodeMirror is defined in http://www.elisokal.com/tmp/sqlEditSupport.js. Many thanks if you can tell me what I’m doing wrong.

x-sql is not a mode. Use sql.

Will do. Many thanks.

Greetings. I changed the mode to sql and now the constants and comments have a color but the keywords do not. There is a screen shot at

Thanks in advance for further guidance.