Skip to content

Commit

Permalink
Merge pull request chairuosen#14 from larsmars/master
Browse files Browse the repository at this point in the history
Add watchers to theme and lang on editor
  • Loading branch information
chairuosen authored Feb 12, 2018
2 parents 708f5de + f2073a5 commit 07d80f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ module.exports = {
value:function (val) {
if(this.contentBackup !== val)
this.editor.setValue(val,1);
},
theme:function (newTheme) {
this.editor.setTheme('ace/theme/'+newTheme);
},
lang:function (newLang) {
this.editor.getSession().setMode('ace/mode/'+newLang);
}
},
mounted: function () {
Expand Down

0 comments on commit 07d80f4

Please sign in to comment.