Hello, world!

" />

Hello, world!

" />

Hello, world!

"/>

How to syntax-highlight HTML inside <script id="template" type="text/ractive">?

111 Views Asked by At

Is there any Vs Code extension to syntax-highlight HTML inside ?

<script id="template" type="text/ractive"> <p>Hello, world!</p> </script>
1

There are 1 best solutions below

0
ZenitoGR On

I found the solution:

from this link I followed the same logic: https://forum.camunda.io/t/syntax-highlighting-for-cam-script-in-vsc/15218/2

so

  1. locate the VSCode folder, mine is:
C:\Users\<username>\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\html\syntaxes
  1. open html.tmLanguage.json
  2. search for jscript in the file
  3. add | ractive | after | jscript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t |

should look like this:

| jscript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  | ractive | livescript\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  |
  1. save the file
  2. close vsvode and relaunch!!!

the result (image) the resulting hightlighting; not perfect but will do