using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using ClientDependency.Core; namespace umbraco.uicontrols { [ClientDependency(ClientDependencyType.Javascript, "CodeArea/javascript.js", "UmbracoClient")] public class CodeArea : System.Web.UI.WebControls.TextBox { public CodeArea() { this.Attributes.Add("class", "codepress"); this.Attributes.Add("onclick", "storeCaret(this)"); this.Attributes.Add("onselect", "storeCaret(this)"); this.Attributes.Add("onkeyup", "storeCaret(this)"); this.Attributes.Add("wrap", "off"); this.TextMode = TextBoxMode.MultiLine; } public bool AutoResize { get; set ; } public int OffSetX { get; set; } public int OffSetY { get; set; } protected override void Render(HtmlTextWriter writer) { base.Render(writer); string jsEventCode = @""; writer.WriteLine(jsEventCode); } } }