Get/Set program language syntax
Brought to you by:
cdolivet
Hi there,
Is there any way to know what program language syntax is being used on the editor?
After i change the syntax language from the combobox, i need to get that value. If it is xml, html, css, vb, etc..
Is there any function to get that value?
And can i set language from a function to? Instead of using the combo from the editor?
Thx in advanced :)
Miguel Guerreiro
Hi,
You can set the syntax highlighting for a given language by running:
For example, assuming your textarea's ID is "editorTextArea" and you want to syntax highlighting for "css":