diff --git a/src/extensions/default/HTMLCodeHints/HtmlAttributes.json b/src/extensions/default/HTMLCodeHints/HtmlAttributes.json index 76673524ac0..d7d24e12b78 100644 --- a/src/extensions/default/HTMLCodeHints/HtmlAttributes.json +++ b/src/extensions/default/HTMLCodeHints/HtmlAttributes.json @@ -212,7 +212,8 @@ "menu/type": { "attribOption": ["context", "list", "toolbar"] }, "ol/type": { "attribOption": ["1", "a", "A", "i", "I"] }, "script/type": { "attribOption": ["text/javascript", "text/ecmascript", "text/jscript", "text/livescript", "text/tcl", "text/x-javascript", "text/x-ecmascript", - "application/x-javascript", "application/x-ecmascript", "application/javascript", "application/ecmascript"] }, + "application/x-javascript", "application/x-ecmascript", "application/javascript", "application/ecmascript", + "text/babel", "text/jsx"] }, "style/type": { "attribOption": ["text/css"] }, "input/type": { "attribOption": ["button", "checkbox", "color", "date", "datetime", "datetime-local", "email", "file", "hidden", "image", "month", "number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week"] }, diff --git a/src/extensions/default/SVGCodeHints/SVGAttributes.json b/src/extensions/default/SVGCodeHints/SVGAttributes.json index 22585f0e2cc..1c707f3e702 100644 --- a/src/extensions/default/SVGCodeHints/SVGAttributes.json +++ b/src/extensions/default/SVGCodeHints/SVGAttributes.json @@ -66,7 +66,7 @@ "attribOptions": ["auto", "inherit", "optimizeQuality", "optimizeSpeed"] }, "contentScriptType": { - "attribOptions": ["application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/jscript", "text/livescript", "text/tcl", "text/x-ecmascript", "text/x-javascript"] + "attribOptions": ["application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/jscript", "text/livescript", "text/tcl", "text/x-ecmascript", "text/x-javascript", "text/babel", "text/jsx"] }, "contentStyleType": { "attribOptions": ["text/css"] @@ -285,7 +285,7 @@ "attribOptions": ["always", "never", "whenNotActive"] }, "script/type": { - "attribOptions": ["application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/jscript", "text/livescript", "text/tcl", "text/x-ecmascript", "text/x-javascript"] + "attribOptions": ["application/ecmascript", "application/javascript", "application/x-ecmascript", "application/x-javascript", "text/ecmascript", "text/javascript", "text/jscript", "text/livescript", "text/tcl", "text/x-ecmascript", "text/x-javascript", "text/babel", "text/jsx"] }, "set/fill": { "attribOptions": ["freeze", "remove"] diff --git a/src/language/LanguageManager.js b/src/language/LanguageManager.js index 98b9b874d4f..fbf7bc3a465 100644 --- a/src/language/LanguageManager.js +++ b/src/language/LanguageManager.js @@ -1101,8 +1101,16 @@ define(function (require, exports, module) { // far were strings, so we spare us the trouble of allowing more complex mode values. CodeMirror.defineMIME("text/x-brackets-html", { "name": "htmlmixed", - "scriptTypes": [{"matches": /\/x-handlebars|\/x-mustache|\/ng-template$|^text\/html$/i, - "mode": null}] + "scriptTypes": [ + { + "matches": /\/x-handlebars|\/x-mustache|\/ng-template$|^text\/html$/i, + "mode": "htmlmixed" + }, + { + "matches": /^text\/(babel|jsx)$/i, + "mode": "jsx" + } + ] }); // Define SVG MIME type so an SVG language can be defined for SVG-specific code hints.