 	var value = _this.$(this).find('option:selected').text(),
 	    $mode =  _this.$(this).val();
 	_this.lang_choice =  $mode;
+    //alert(_this.lang_choice);
 	if(window.localStorage){
 	  window.localStorage.setItem('cm_lang_choice',$mode);
 	}

      return display

    cminput: (container) =>
      element = $(container).find("textarea")
      tabsize = element.data("tabsize")
      mode = @lang_choice
      if mode == ''
          mode = element.data("mode")
      linenumbers = element.data("linenums")
      readOnly = element.data("readonly")
      spaces = Array(parseInt(tabsize) + 1).join(" ")

	if(window.cmeditor){
	  window.cmeditor.setOption('mode',$mode);
	}else{
	  console.log('cmeditor is set afterwards, cool he will get the lang from _this.lang_choice');
	}
	
    }).trigger('change');
