How to syntax highlight HTML code with embedded VBScript in WinForms SyntaxEditor (EditControl)?
Highlight html code
The EditControl provides built-in syntax highlighting support to popular languages such as C#, VB.NET, XML, HTML, Java, SQL, PowerShell, C, JavaScript, VBScript, and Delphi. But, the EditControl does not have built-in syntax highlighting support for files that have more than one language such as HTML embedded with VBScript. However, you can achieve this using custom language configuration. To demonstrate this, a configuration file that defines a custom language (HTML embedded with VBScript) has been prepared and loaded to the EditControl using the Configurator.Open function. The attached sample demonstrates this.
C#:
this.editControl1.Configurator.Open(configPath); this.editControl1.LoadFile(Path.GetDirectoryName(Application.ExecutablePath) + @"\..\..\Test Files\HTML_VBScript.html");
VB:
Me.editControl1.Configurator.Open(configPath) Me.editControl1.LoadFile(Path.GetDirectoryName(Application.ExecutablePath) & "\..\..\Test Files\HTML_VBScript.html")
Samples:
C#: http://www.syncfusion.com/downloads/support/directtrac/general/ze/CSharp-915372190
VB: http://www.syncfusion.com/downloads/support/directtrac/general/ze/VB-1453619925
Reference link: https://help.syncfusion.com/windowsforms/syntax-editor/syntax-highlighting