We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Turning On/Off Syntax Highlighting

Is there a way to turn on/off the syntax highlighting programmatically?

I'm writing an app that switches between HTML code view and plain text view and back, and I need to be able to view the plain text without syntax highlighting and then view the HTML code with syntax highlighting.

Any Info you can provide will be appreciated.

John.
[VB.NET 2005 & Syncfusion.Edit.Windows v.4.402.0.51]

2 Replies

JC John Couture January 29, 2007 08:30 PM UTC

As additional info...

I'm using the ApplyConfiguration method of the control to set the syntax highlighting. If I'm viewing plain text, I use:

EditControl1.ApplyConfiguration(KnownLanguages.Text)

If I'm viewing HTML code, I use:

EditControl1.ApplyConfiguration(KnownLanguages.HTML)

One problem I'm encountering is that any numbers that show up in the text (e.g. Account 1234) have a color applied to them when in "Plain Text" mode. In the example: "Account 1234", the 1234 is showing up in a dark blue color. I don't want any text coloring when KnownLanguages.Text is applied.

Again, thanks for any information you can provide.

John
[VB.NET 2005 & Syncfusion.Edit.Windows v.4.402.0.51]




AD Administrator Syncfusion Team January 30, 2007 01:20 AM UTC

Hi John,

It is possible to turn on/off the syntax highlighting programmatically. I have attached a sample that illustrates this. Let me know if this meets your requirements.

Thanks for your patience.

Regards,
Ebenezer.P

sample

Loader.
Live Chat Icon For mobile
Up arrow icon