Request for integration help


#1

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!


#2

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


#3

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.


#4

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.


#5

x-sql is not a mode. Use sql.


#6

Will do. Many thanks.


#7

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.