Posted 18 years ago
by Dan Oren
-
Software Developer,
Watchfire
I am using CustomHighlightingStyle for tokens to set their font and color.
Since I set the editor language to HTML I can't see the changes that I made with the CustomHighlightingStyle :Is there a way to set the language for a specific section in the text and not all the text ?
(I need this also for other cases)
Is there a priority order that I can control in order to set the CustomHighlightingStyle to be "Strongest" then the language ?
Dan
Since I set the editor language to HTML I can't see the changes that I made with the CustomHighlightingStyle :
//Loading the language definition xml file.
editor.Document.Language.IsUpdating = true;
editor.Document.LoadLanguageFromXml(@"MyHTMLFile.xml", 0);
editor.Document.Language.IsUpdating = false;
editor.Document.Tokens[100].CustomHighlightingStyle = new HighlightingStyle("myStyle", "myStyle", Color.Red, Color.Yellow, true, false, false);
editor.Document.Tokens[100].Modified = true;
(I need this also for other cases)
Is there a priority order that I can control in order to set the CustomHighlightingStyle to be "Strongest" then the language ?
Dan
Dan Oren