From d803ed0d5104652a1f990f34a754bbc6c71a76c7 Mon Sep 17 00:00:00 2001 From: Pierre-Chanel Gauthier Date: Sun, 16 Apr 2017 15:01:21 +0200 Subject: [PATCH] Fix usage of right lang in each ace editor area --- fiddlestick-ace.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fiddlestick-ace.js b/fiddlestick-ace.js index 403c87b..25a0a18 100644 --- a/fiddlestick-ace.js +++ b/fiddlestick-ace.js @@ -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,