Plugin for language mix HTML, JS, CSS + 2 ECMA code blocks? 关注
i'm struggling with a template engine file for generating html-files from a desktop app (based on QT, if this helps ...).
such a template generation file consists of a form block on top (setting up a form presented inside of the app mentioned above for configuring some values for the desired HTML output). this block is a ECMA-262 script wrapped in php style <?ggf .... ?> tags. e.g.
form.addLineEdit("htmltitle","HTML Page Title",0,"");
then a processing section is following to work with the form values from above. it's also based on ECMA -262 and wrapped in <?ggs ... ?> tags. e.g.
after this section the html assembly for the output starts with plain HTML, JS and CSS code and <?ggs ... ?> injections for retrieving values / variables calculated above. e.g.
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title><?ggs document.write(document.expandVariables(htmlTitle)); ?></title>
is there a way to create a language / syntax coloring template/plugin in/for phpstorm?
any tipps or hints for pointing me in the right direction is very appreciated. thanks a lot in advance!
it's not an easy task: https://plugins.jetbrains.com/docs/intellij/custom-language-support-tutorial.html
thank you, Konstantin Annikov!
this indeed doesn't look very easy and as java is involved i'm out of luck here.
is there a way to make phpstorm recognize these script parts between the <?ggf> and <?ggs> tags as ecma?
You can use instructions here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000643090/comments/115000531470
this looks promising. i'll give it a test shot asap and let you know.