diff --git a/www/code/main.js b/www/code/main.js index a106b532b..d4decf89f 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -322,10 +322,12 @@ define([ }); $rightside.append($forgetPad); + var lastLanguage = Cryptpad.getPadAttribute('language') || 'javascript'; + /* Let the user select different syntax highlighting modes */ var syntaxDropdown = ''; @@ -347,6 +349,7 @@ define([ var $language = module.$language = $bar.find('#language-mode').on('change', function () { var mode = $language.val(); setMode(mode); + Cryptpad.setPadAttribute('language', mode); }); $rightside.append(themeDropdown);