70681

Intellij idea javascript recognition in script tag where type isn't “text/javascript”

Question:

I use MathJax javascript library. When I change MathJax config I have a problem because he is actually javascript code but his type is "text/x-mathjax-config" and Intellij Idea don't recognize him as code.

Can I add extra types to Intellij Idea configuration for javascript support?

Answer1:

JetBrains support team gave me <a href="http://devnet.jetbrains.com/message/5506225#5506225" rel="nofollow">answer</a>:

<ol><li>Settings / Language Injections.</li> <li>Add XML tag injection.</li> <li>In its properties: <ul><li>Language ID: JavaScript (or any you like).</li> <li>XML Tag local name: script.</li> <li>XPath condition: @type="text/x-mathjax-config"</li> </ul></li> </ol>

Recommend

  • iPython notebook cannot render valid latex, is it possible to get an error message?
  • Recognize when writing in between two $$ signs
  • How do you type the dollar sign when you have mathjax installed?
  • Add MathJax script to pages in Office 365 Sharepoint
  • Is it possible to get the Cursive Plugin installed with Android Studio?
  • Intellij idea - how to always show method parameter names
  • Created a maven project using quickstart using intelliJ, didn't seem to generate any dir struct
  • Groovy install HTTPBuilder now that Codehaus shutdown?
  • ZXING intent request code (identifying my intent)
  • Send multimedia commands
  • abstracting over a collection
  • jQuery: add elements until a particular height is reached
  • Is there some graphical way to create my own configuration file on SonarLint?
  • Cast between interfaces whose interface signatures are same
  • Invalid object name 'dbo.Item'
  • Spring Cloud Microservice Architecture Confusion
  • Reduction and collapse clauses in OMP have some confusing points
  • Hardware Accelerated Image Scaling in windows using C++
  • Combining SpatialPolygonsDataFrame of two neighbour countries
  • C++ Partial template specialization - design simplification
  • How can I send an e-mail from a vbs script
  • Projection media query: browser support and workarounds?
  • Javascript simulate pressing enter in input box
  • Read text file and split every line in MSBuild
  • C# - Serializing and deserializing static member
  • Java applet as stand-alone Windows application?
  • Does CUDA 5 support STL or THRUST inside the device code?
  • Can I make an Android app that runs a web view in Chrome 39?
  • Timeout for blocking function call, i.e., how to stop waiting for user input after X seconds?
  • Why winpcap requires both .lib and .dll to run?
  • R: gsub and capture
  • Is there a mandatory requirement to switch app.yaml?
  • How to include full .NET prerequisite for Wix Burn installer
  • Error creating VM instance in Google Compute Engine
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Angular 2 constructor injection vs direct access
  • Java static initializers and reflection
  • Android Google Maps API OnLocationChanged only called once
  • reshape alternating columns in less time and using less memory
  • UserPrincipal.Current returns apppool on IIS