private void Run() { textarea = jQuery.Select("#EditorTextArea"); textarea .Focus(e => SavePosition()) .MouseUp(e => SavePosition()) .KeyUp(e => { SavePosition(); var newValue = textarea.Val().Replace("\r", ""); connector.SendOperatinos(model.GenerateOperations(newValue)); }); connector.Start(); }