ACE Editor Extension

0
0

Hi,

I’m loving the Ace Editor extension, our application lets us build SQL queries dynamically and we can actually enter the whole SQL. I’ve read that the Ace Editor supports syntax highlighting and noticed the “Language” property, however I can’t find any documentation on how to implement it for SQL – I’ve tried “ace/code/sql” and “sql” but what do I need to do?

Thanks.

  • You must to post comments
1
0

If you need to enable autocompletion, add this in OnLoad somewhere

 this.aceEditor1.Packages.Add(new Widget.Package
 {
 Name = "language_tools.js",
 Source = "resource.wx/Wisej.Web.Ext.AceEditor.JavaScript.src.ext-language_tools.js"
 });
 this.aceEditor1.Options.enableBasicAutocompletion = true;
 this.aceEditor1.Options.enableLiveAutocompletion = true;


Basically all the options are available through the Options dynamic object.

 

  • You must to post comments
0
0

Why can’t I accept that sometimes it is the easy option? Thank you Frank and sorry for asking what looks like a really dumb question.

  • Frank (ITG)
    No worries at all! Glad it´s working for you. Best regards, Frank
  • Neil Hoskins
    I did try “sql” but I’ve just noticed that the text didn’t have any SQL in it; it was just table names – I am officially due a weekend.
  • You must to post comments
0
0

Hi Neil,

in your case it should just be

this.aceEditor1.Language = "sql";

Best regards
Frank

 

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.