$.texyla.initPlugin(function(){var _this=this;this.textarea.bind($.browser.opera?"keypress":"keydown",function(e){_this.keys(e);});});$.texyla.extend({keys:function(e){var pressedKey=e.charCode||e.keyCode||-1;var action=false;if(e.ctrlKey&&pressedKey==66&&!e.altKey){this.texy.bold();action=true;}
if(e.ctrlKey&&pressedKey==73){this.texy.italic();action=true;}
if(pressedKey==9&&e.shiftKey){this.texy.unindent();action=true;}
if(pressedKey==9&&!e.shiftKey){if(this.texy.update().text().indexOf(this.texy.lf())==-1){this.texy.tag('\t','');}else{this.texy.indent();}
action=true;}
if(e.ctrlKey&&pressedKey==83){this.submit();action=true;}
if(action){if(e.preventDefault&&e.stopPropagation){e.preventDefault();e.stopPropagation();}else{window.event.cancelBubble=true;window.event.returnValue=false;}}}});