Code highlighting for custom file extensions

I had the same lack of highlighting editing xhtml files which have an xhtml extension.

Based on Syntax highlighting for jsx in .js files?

I now use this bookmarklet

    javascript:(function() {   application.editor().setOption("mode", "text/xml"); 
                               CodeMirror.autoLoadMode(application.editor(), "xml"); })()

https://codemirror.net/doc/manual.html#config documents how to use setOptions, in particular “mode”. For example one could also provide xml mode option, it seems.