Added quick lang-selection options to code editor

This commit is contained in:
Dan Brown
2017-07-01 15:50:28 +01:00
parent a94844b6b7
commit de6d8a811c
3 changed files with 35 additions and 0 deletions

View File

@ -11,6 +11,10 @@ const methods = {
updateEditorMode(language) {
codeLib.setMode(this.editor, language);
},
updateLanguage(lang) {
this.language = lang;
this.updateEditorMode(lang);
},
open(code, language, callback) {
this.show();
this.updateEditorMode(language);