Skip to content

Commit

Permalink
Fix usage of right lang in each ace editor area
Browse files Browse the repository at this point in the history
  • Loading branch information
KmeCnin committed Apr 16, 2017
1 parent 5f4e3b0 commit d803ed0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fiddlestick-ace.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
if (e.tagName.toLowerCase() === 'textarea') {
editor = ace.edit(e);
editor.setTheme("ace/theme/monokai");
editor.getSession().setMode("ace/mode/javascript");
var lang = fiddleType === 'js' ? 'javascript' : fiddleType;
editor.getSession().setMode("ace/mode/"+lang);
data[fiddleId][fiddleType].push({
'editor': editor,
'type': fiddleType,
Expand Down

0 comments on commit d803ed0

Please sign in to comment.