How can I make some xml-tags activate different language highligting?


I’d like to call different language-highligting-modes just as in mixed mode. The origin is always xml (with some quirks) and highlighters that should be requested upon match are php, javascript, css, html and of course xml itself.

I look at modes / simple modes but can’t find a good starting point. Most thankful for any advices.

#1. Commenting, using #, should also be allowed before xml
# or actually "xml_fa" since xml-rules are being bent...
#2. Row breaks (seems to work OOTB)
  <content type="html5/dialog" sql="select * from tbl_tennants where \
#3. Custompost-tag should invoke php mode
switch($action) {
case 'update':
      <test />
#4. Raw-tag could be of type css, html, js/javascript and should invoke corr mode
      <raw type="js">
        alert('js running');


The scriptTypes option to the htmlmixed mode might be helpful. See this page.


Thanks Marijn, I'm trying to follow the documentation but don't see how I can trigger on other than <script XX>. CSS for example, by default triggers on <style>, not <script>. For example, how would <custompost> (without any args) trigger php? Best regards, /TJ


Oh, the docs were outdated and only showed the old way of configuring. Take a look at the htmlmixed mode again, I’ve updated the docs to describe the more flexible tags option.


Sorry, but I fail to find any documentation regarding *tags* . Hate to tell you but I know nothing about mustashe. Merry christmas by the way, (if you're into that)

Ahhh, lost in browser cache. Thanks!