Hi,
I'm trying to make a script which create an XML document.
It works but I cant achieve to set the XML language coloration on this document.
I tryed several things like above, but it didn't work (no error but document stay to Normal text file).
editor.setLexerLanguage('XML') editor.setLexer(LEXER.XML) editor.changeLexerState(0, -1) editor.colourise(0, -1)
I tryed to use Notepad.setLangType(langType[, bufferID]) but I don't know how to use
notepad.setLangType(LANGTYPE.L_XML)
How can I set my document langage to XML with XML coloration?
PS: In documentation there's Notepad.setCurrentLang(langType) but I've error saying it doesn't exist.
Have you tried "notepad.menuCommand(MENUCOMMAND.LANG_XML)"? ;)
Yes I ended to use this command but I liked to understand why the previous solution doesn't work
Log in to post a comment.
Hi,
I'm trying to make a script which create an XML document.
It works but I cant achieve to set the XML language coloration on this document.
I tryed several things like above, but it didn't work (no error but document stay to Normal text file).
I tryed to use Notepad.setLangType(langType[, bufferID]) but I don't know how to use
How can I set my document langage to XML with XML coloration?
PS: In documentation there's Notepad.setCurrentLang(langType) but I've error saying it doesn't exist.
Have you tried "notepad.menuCommand(MENUCOMMAND.LANG_XML)"?
;)
Yes I ended to use this command but I liked to understand why the previous solution doesn't work