using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.UI;
using System.Web.UI.Design;
using System.Web.UI.WebControls;
using Interspire.DevEdit.Design;
namespace Interspire.DevEdit
{
///
/// HTML Rich Editor control.
///
///
///
/// <ewp:DevEdit id="TestControl" runat="server"><font face="verdana" color="#1e90ff" size="5">Welcome to DevEdit!</font></ewp:DevEdit>
///
///
[ DefaultProperty("Text"),
ToolboxData("<{0}:DevEdit runat=server> {0}:DevEdit>"),
Description("DevEdit WYSIWYG TextBox for ASP.NET"),
Designer(typeof(DevEditDesigner)),
ParseChildren(false, "Text")]
//ControlBuilder(typeof(DevEditControlBuilder))]
public class DevEdit : System.Web.UI.WebControls.WebControl, System.Web.UI.IPostBackDataHandler, System.Web.UI.IParserAccessor
{
#region Property Accessors
///
/// Gets or sets the HTML contents of the DevEdit control.
///
[Bindable(true),
Category("Appearance"),
DefaultValue(""),
PersistenceMode(PersistenceMode.InnerDefaultProperty),
RefreshProperties(RefreshProperties.All)]
public string Text
{
get {return GetValue(false);}
set {SetValue(value);}
}
///
/// Gets or sets the HTML contents of the DevEdit control.
///
[Browsable(false)]
public string Value
{
get {return GetValue(false);}
set{SetValue(value);}
}
///
/// Hides or shows the remove text formatting button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the remove text formatting button be shown on the control?")]
public bool RemoveTextFormattingButton
{
get {return !(bool)GetViewStateDefault("e__hideRemoveTextFormatting",false);}
set {ViewState["e__hideRemoveTextFormatting"] = !value;}
}
///
/// Hides or shows the spell check button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the Spell Check button be shown on the control?")]
public bool SpellingButton
{
get {return !(bool)GetViewStateDefault("e__hideSpelling",false);}
set {ViewState["e__hideSpelling"] = !value;}
}
///
/// Hides or shows the spell check button.
///
[Category("Behavior"),
DefaultValue(SpellingLanguageEnum.American),
Description("Which language should be used for spell checking?")]
public SpellingLanguageEnum SpellingLanguage
{
get {return (SpellingLanguageEnum)GetViewStateDefault("e__language",(int)SpellingLanguageEnum.American);}
set {ViewState["e__language"] = (int)value;}
}
///
/// Hides or shows the full screen button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the full button be shown on the control?")]
public bool FullScreenButton
{
get {return !(bool)GetViewStateDefault("e__hideFullScreen",false);}
set {ViewState["e__hideFullScreen"] = !value;}
}
///
/// Hides or shows the strikethrough button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the strikethrough button be shown on the control?")]
public bool StrikethroughButton
{
get {return !(bool)GetViewStateDefault("e__hideStrikethrough",false);}
set {ViewState["e__hideStrikethrough"] = !value;}
}
///
/// Hides or shows the bold button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the bold button be shown on the control?")]
public bool BoldButton
{
get {return !(bool)GetViewStateDefault("e__hideBold",false);}
set {ViewState["e__hideBold"] = !value;}
}
///
/// Hides or shows the underline button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the underline button be shown on the control?")]
public bool UnderlineButton
{
get {return !(bool)GetViewStateDefault("e__hideUnderline",false);}
set {ViewState["e__hideUnderline"] = !value;}
}
///
/// Hides or shows the italic button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the italic button be shown on the control?")]
public bool ItalicButton
{
get {return !(bool)GetViewStateDefault("e__hideItalic",false);}
set {ViewState["e__hideItalic"] = !value;}
}
///
/// Hides or shows the numeric list button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the numeric list button be shown on the control?")]
public bool NumericListButton
{
get {return !(bool)GetViewStateDefault("e__hideNumberList",false);}
set {ViewState["e__hideNumberList"] = !value;}
}
///
/// Hides or shows the bulleted list button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the bulleted list button be shown on the control?")]
public bool BulletedListButton
{
get {return !(bool)GetViewStateDefault("e__hideBulletList",false);}
set {ViewState["e__hideBulletList"] = !value;}
}
///
/// Hides or shows the decrease indent button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the decrease indent button be shown on the control?")]
public bool DecreaseIndentButton
{
get {return !(bool)GetViewStateDefault("e__hideDecreaseIndent",false);}
set {ViewState["e__hideDecreaseIndent"] = !value;}
}
///
/// Hides or shows the increase indent button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the increase indent button be shown on the control?")]
public bool IncreaseIndentButton
{
get {return !(bool)GetViewStateDefault("e__hideIncreaseIndent",false);}
set {ViewState["e__hideIncreaseIndent"] = !value;}
}
///
/// Hides or shows the superscript button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the superscript button be shown on the control?")]
public bool SuperScriptButton
{
get {return !(bool)GetViewStateDefault("e__hideSuperScript",false);}
set {ViewState["e__hideSuperScript"] = !value;}
}
///
/// Hides or shows the subscript button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the subscript button be shown on the control?")]
public bool SubScriptButton
{
get {return !(bool)GetViewStateDefault("e__hideSubScript",false);}
set {ViewState["e__hideSubScript"] = !value;}
}
///
/// Hides or shows the left align button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the left align button be shown on the control?")]
public bool LeftAlignButton
{
get {return !(bool)GetViewStateDefault("e__hideLeftAlign",false);}
set {ViewState["e__hideLeftAlign"] = !value;}
}
///
/// Hides or shows the center align button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the center align button be shown on the control?")]
public bool CenterAlignButton
{
get {return !(bool)GetViewStateDefault("e__hideCenterAlign",false);}
set {ViewState["e__hideCenterAlign"] = !value;}
}
///
/// Hides or shows the right align button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the right align button be shown on the control?")]
public bool RightAlignButton
{
get {return !(bool)GetViewStateDefault("e__hideRightAlign",false);}
set {ViewState["e__hideRightAlign"] = !value;}
}
///
/// Hides or shows the justify align button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the justify align button be shown on the control?")]
public bool JustifyAlignButton
{
get {return !(bool)GetViewStateDefault("e__hideJustifyAlign",false);}
set {ViewState["e__hideJustifyAlign"] = !value;}
}
///
/// Hides or shows the insert horizontal rule button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert horizontal rule button be shown on the control?")]
public bool HorizontalRuleButton
{
get {return !(bool)GetViewStateDefault("e__hideHorizontalRule",false);}
set {ViewState["e__hideHorizontalRule"] = !value;}
}
///
/// Hides or shows the insert link button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert link button be shown on the control?")]
public bool LinkButton
{
get {return !(bool)GetViewStateDefault("e__hideLink",false);}
set {ViewState["e__hideLink"] = !value;}
}
///
/// Hides or shows the insert anchor button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert anchor button be shown on the control?")]
public bool AnchorButton
{
get {return !(bool)GetViewStateDefault("e__hideAnchor",false);}
set {ViewState["e__hideAnchor"] = !value;}
}
///
/// Hides or shows the insert mail link button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert mail link button be shown on the control?")]
public bool MailLinkButton
{
get {return !(bool)GetViewStateDefault("e__hideMailLink",false);}
set {ViewState["e__hideMailLink"] = !value;}
}
///
/// Hides or shows the help button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the help button be shown on the control?")]
public bool HelpButton
{
get {return !(bool)GetViewStateDefault("e__hideHelp",false);}
set {ViewState["e__hideHelp"] = !value;}
}
///
/// Hides or shows the font list.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the font list be shown on the control?")]
public bool FontList
{
get {return !(bool)GetViewStateDefault("e__hideFontList",false);}
set {ViewState["e__hideFontList"] = !value;}
}
///
/// Gets or sets an array of font names to appear in the font list.
///
[Category("Controls"),
DefaultValue("Times New Roman, Arial, Verdana, Tahoma, Courier New, Georgia"),
Description("Should the font list be shown on the control?")]
public string FontListItems
{
get
{
string[] fontnames = (string[])GetViewStateDefault("e__fontNameList", new string[] {"Times New Roman", "Arial", "Verdana", "Tahoma", "Courier New", "Georgia"});
StringBuilder retStr = new StringBuilder();
if (fontnames.Length > 0)
{
for(int i = 0; i <= fontnames.GetUpperBound(0); i++)
retStr.Append(fontnames[i]+ ", ");
retStr.Remove(retStr.Length-2, 2);//remove the last comma-space
}
return retStr.ToString();
}
set
{
string[] aryValues = value.Split(',');
for(int i = 0; i <= aryValues.GetUpperBound(0); i++)
aryValues[i] = aryValues[i].Trim();
ViewState["e__fontNameList"] = aryValues;}
}
///
/// Gets or sets an array of font names to appear in the font list.
///
[Browsable(false)]
public string[] FontListItemsArray
{
get{return (string[])GetViewStateDefault("e__fontNameList", null);}
set{ViewState["e__fontNameList"] = value;}
}
///
/// Hides or shows the size list.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the size list be shown on the control?")]
public bool SizeList
{
get {return !(bool)GetViewStateDefault("e__hideSizeList",false);}
set {ViewState["e__hideSizeList"] = !value;}
}
///
/// Gets or sets an array of font sizes to appear in the font size list.
///
[Category("Controls"),
DefaultValue("1, 2, 3, 4, 5, 6, 7"),
Description("What sizes should appear in the size list drop-down?")]
public string SizeListItems
{
get
{
string[] fontsizes = (string[])GetViewStateDefault("e__fontSizeList", new string[] {"1","2","3","4","5","6","7"});
StringBuilder retStr = new StringBuilder();
if (fontsizes.Length > 0)
{
for(int i = 0; i <= fontsizes.GetUpperBound(0); i++)
retStr.Append(fontsizes[i]+ ", ");
retStr.Remove(retStr.Length-2, 2);//remove the last comma-space*/
}
return retStr.ToString();
}
set
{
string[] aryValues = value.Split(',');
for(int i = 0; i <= aryValues.GetUpperBound(0); i++)
aryValues[i] = aryValues[i].Trim();
ViewState["e__fontSizeList"] = aryValues;}
}
///
/// Gets or sets an array of font sizes to appear in the font size list.
///
[Browsable(false)]
public string[] SizeListItemsArray
{
get{return (string[])GetViewStateDefault("e__fontSizeList", null);}
set{ViewState["e__fontSizeList"] = value;}
}
///
/// Hides or shows the format list.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the format list be shown on the control?")]
public bool FormatList
{
get {return !(bool)GetViewStateDefault("e__hideFormatList",false);}
set {ViewState["e__hideFormatList"] = !value;}
}
///
/// Hides or shows the style list.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the style list be shown on the control?")]
public bool StyleList
{
get {return !(bool)GetViewStateDefault("e__hideStyleList",false);}
set {ViewState["e__hideStyleList"] = !value;}
}
///
/// Hides or shows the fore color button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the fore color button be shown on the control?")]
public bool ForeColorButton
{
get {return !(bool)GetViewStateDefault("e__hideForeColor",false);}
set {ViewState["e__hideForeColor"] = !value;}
}
///
/// Hides or shows the back color button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the back color button be shown on the control?")]
public bool BackColorButton
{
get {return !(bool)GetViewStateDefault("e__hideBackColor",false);}
set {ViewState["e__hideBackColor"] = !value;}
}
///
/// Hides or shows the insert table button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert table button be shown on the control?")]
public bool TableButton
{
get {return !(bool)GetViewStateDefault("e__hideTable",false);}
set {ViewState["e__hideTable"] = !value;}
}
///
/// Hides or shows the insert form button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert form button be shown on the control?")]
public bool FormButton
{
get {return !(bool)GetViewStateDefault("e__hideForm",false);}
set {ViewState["e__hideForm"] = !value;}
}
///
/// Hides or shows the insert image button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert image button be shown on the control?")]
public bool ImageButton
{
get {return !(bool)GetViewStateDefault("e__hideImage",false);}
set {ViewState["e__hideImage"] = !value;}
}
///
//Hides or shows the insert text box button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert text box button be shown on the control?")]
public bool TextBoxButton
{
get {return !(bool)GetViewStateDefault("e__hideTextBox",false);}
set {ViewState["e__hideTextBox"] = !value;}
}
///
/// Hides or shows the absolute positioning button
///
[Category("Controls"),
DefaultValue(true),
Description("Should the absolute position button be shown on the control?")]
public bool AbsolutePositionButton
{
get {return !(bool)GetViewStateDefault("e__hideTextBox",false);}
set {ViewState["e__hideTextBox"] = !value;}
}
///
/// Hides or shows the insert symbol button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the insert symbol button be shown on the control?")]
public bool SymbolButton
{
get {return !(bool)GetViewStateDefault("e__hideSymbol",false);}
set {ViewState["e__hideSymbol"] = !value;}
}
///
/// Hides or shows the open properties button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the properties button be shown on the control?"),
RefreshProperties(RefreshProperties.All)]
public bool PropertiesButton
{
get {return (!(bool)GetViewStateDefault("e__hideProperties",false)) && (DocType == DocTypeEnum.HtmlPage);}
set
{
if(value)
DocType = DocTypeEnum.HtmlPage;
ViewState["e__hideProperties"] = !value;
}
}
///
/// Hides or shows the clean HTML button.
///
[Category("Controls"),
DefaultValue(true),
Description("Should the clean HTML button be shown on the control?")]
public bool CleanHTMLButton
{
get {return !(bool)GetViewStateDefault("e__hideWord",false);}
set {ViewState["e__hideWord"] = !value;}
}
///
/// Hides or shows the show guidelines button.
///
[Category("Controls"),
DefaultValue(true),
Description(@"Should the hide/showguidelines button be shown on the control?")]
public bool GuidelinesButton
{
get {return !(bool)GetViewStateDefault("e__hideGuidelinesButton",false);}
set {ViewState["e__hideGuidelinesButton"] = !value;}
}
///
/// Hides or shows the source mode from the user.
///
[Category("Behavior"),
DefaultValue(true),
Description("Is source mode available to the user?")]
public bool SourceMode
{
get {return !(bool)GetViewStateDefault("e__disableSourceMode",false);}
set {ViewState["e__disableSourceMode"] = !value;}
}
///
/// Hides or shows the preview mode from the user.
///
[Category("Behavior"),
DefaultValue(true),
Description("Is preview mode available to the user?")]
public bool PreviewMode
{
get {return !(bool)GetViewStateDefault("e__disablePreviewMode",false);}
set {ViewState["e__disablePreviewMode"] = !value;}
}
///
/// Hides or shows the guidelines. Use the GuidelinesButton propert to hide the guideline button from the user.
///
[Category("Appearance"),
DefaultValue(true),
Description("Are guidelines on by default?")]
public bool Guidelines
{
get {return (bool)GetViewStateDefault("e__guidelinesOnByDefault",true);}
set {ViewState["e__guidelinesOnByDefault"] = value;}
}
///
/// Sets or gets the folder for the image manager. Set this folder path
/// relative to your ApplicationRoot. Be sure to include the starting / character.
///
[Category("Behavior"),
DefaultValue("images"),
Description("Path to the user images.")]
public string ImagePath
{
get{return (string)GetViewStateDefault("e__imagePath","images");}
set{ViewState["e__imagePath"] = value;}
}
///
/// Enables or disables the ability for the user to be able to insert images with URLs from the web.
///
[Category("Behavior"),
DefaultValue(true),
Description("Allow user to insert images from the web?")]
public bool ImageInsertFromWeb
{
get{return !(bool)GetViewStateDefault("e__hideWebImage",false);}
set{ViewState["e__hideWebImage"] = !value;}
}
///
/// Should inserted image URL references be absolute or relative?
///
[Category("Behavior"),
DefaultValue(typeof(PathTypeEnum), "RelativeToRoot"),
Description("How should user image paths be inserted?")]
public PathTypeEnum ImagePathType
{
get {return (PathTypeEnum)GetViewStateDefault("e__imagePathType",(int)PathTypeEnum.RelativeToRoot);}
set {ViewState["e__imagePathType"] = (int)value;}
}
///
/// Sets the location of the stylesheet for a code snippet
///
/// URL of the stylesheet to apply to the snippet.
[Category("Appearance"),
DefaultValue(""),
Description("Gets or sets the absolute or relative path to the cascading style sheet (CSS) applied to the content while designing in snippet mode.")]
public string SnippetCSS
{
get{return (string)GetViewStateDefault("e__snippetCSS","");}
set{ViewState["e__snippetCSS"] = value;}
}
///
/// Cols for the TextArea tag when not using IE.
///
/// Cols for the TextArea tag when not using IE.
[Category("Appearance"),
DefaultValue(40),
Description("Cols for the TextArea tag when not using IE.")]
public int TextAreaCols
{
get{return (int)GetViewStateDefault("e__textareaCols",40);}
set{ViewState["e__textareaCols"] = value;}
}
///
/// Rows for the TextArea tag when not using IE.
///
/// Rows for the TextArea tag when not using IE.
[Category("Appearance"),
DefaultValue(4),
Description("Rows for the TextArea tag when not using IE.")]
public int TextAreaRows
{
get{return (int)GetViewStateDefault("e__textareaRows",4);}
set{ViewState["e__textareaRows"] = value;}
}
///
/// Changes the default behavior between page editing and snippet editing.
/// In page editing mode, the code produced will contain HTML and HEAD tags.
/// The "Modify Page Properties" button will be unavailable in snippet mode.
///
[Category("Behavior"),
DefaultValue(typeof(DocTypeEnum),"Snippet"),
Description("Is the user editing a full document or a snippet of an HTML document?")]
public DocTypeEnum DocType
{
get {return (DocTypeEnum)GetViewStateDefault("e__docType",(int)DocTypeEnum.Snippet);}
set {ViewState["e__docType"] = (int)value;}
}
///
/// Controls the appearence of the image manager.
///
[Category("Behavior"),
DefaultValue(typeof(ImageDrawEnum),"Thumbnail"),
Description("How should images be displayed in the image manager?")]
public ImageDrawEnum ImageDisplayType
{
get {return (ImageDrawEnum)GetViewStateDefault("e__imageDisplayType",(int)ImageDrawEnum.Thumbnail);}
set {ViewState["e__imageDisplayType"] = (int)value;}
}
///
/// Enables or disables the ability to allow users to upload their own images in the image manager.
///
[Category("Behavior"),
DefaultValue(true),
Description("Are the users allowed to upload images?")]
public bool ImageUploading
{
get {return !(bool)GetViewStateDefault("e__disableImageUploading",false);}
set {ViewState["e__disableImageUploading"] = !value;}
}
///
/// Enables or disables the ability to allow users to delete images from the image folder.
///
[Category("Behavior"),
DefaultValue(true),
Description("Are users allowed to delete images?")]
public bool ImageDeleting
{
get {return !(bool)GetViewStateDefault("e__disableImageDeleting",false);}
set {ViewState["e__disableImageDeleting"] = !value;}
}
///
/// When true, causes the DevEdit Pro control to produce XHTML compliant code. (e.g <BR/> instead of <BR>)
///
[Category("Behavior"),
DefaultValue(true),
Description("Disables XHTML-compliant output.")]
public bool XHTMLFormatting
{
get {return (bool)GetViewStateDefault("e__enableXHTMLSupport",true);}
set {ViewState["e__enableXHTMLSupport"] = value;}
}
///
/// Causes the DevEdit control to insert <BR> tags instead of <P> tags when the user presses ENTER while editing in the control;
///
[Category("Behavior"),
DefaultValue(false),
Description(@"Adds a tags instead of
tags when the user presses Enter.")]
public bool UseSingleLineReturn
{
get {return (bool)GetViewStateDefault("e__useSingleLineReturn",false);}
set {ViewState["e__useSingleLineReturn"] = value;}
}
///
/// Array of predefined named HTML strings to use for the Insert Custom HTML function.
///
private System.Collections.Hashtable CustomInsertArray
{
get
{
if(ViewState["e__customInsertArray"] == null)
ViewState["e__customInsertArray"] = new System.Collections.Hashtable();
return (System.Collections.Hashtable)ViewState["e__customInsertArray"];
}
}
///
/// Indicates whether any custom HTML snippets have been defined.
///
private bool HasCustomInserts
{
get
{
return (CustomInsertArray.Count > 0);
}
}
///
/// Gets the number of top row icons that have been hidden.
/// Used to determine if the top row should be displayed.
///
private int NumTopHidden
{
get
{
int count = 0;
if(!RemoveTextFormattingButton) count ++;
if(!StrikethroughButton) count ++;
if(!SpellingButton) count ++;
if(!FullScreenButton) count ++;
if(!BoldButton) count ++;
if(!UnderlineButton) count ++;
if(!ItalicButton) count ++;
if(!NumericListButton) count ++;
if(!BulletedListButton) count ++;
if(!DecreaseIndentButton) count ++;
if(!IncreaseIndentButton) count ++;
if(!SuperScriptButton) count ++;
if(!SubScriptButton) count ++;
if(!LeftAlignButton) count ++;
if(!CenterAlignButton) count ++;
if(!RightAlignButton) count ++;
if(!JustifyAlignButton) count ++;
if(!HorizontalRuleButton) count ++;
if(!LinkButton) count ++;
if(!AnchorButton) count ++;
if(!MailLinkButton) count ++;
if(!HelpButton) count ++;
return count;
}
}
///
/// Gets the number of bottom row icons that have been hidden.
/// Used to determine if the second row of icons in the toolbar should be displayed.
///
private int NumBottomHidden
{
get
{
int count = 0;
if(!FontList) count ++;
if(!SizeList) count ++;
if(!FormatList) count ++;
if(!StyleList) count ++;
if(!ForeColorButton) count ++;
if(!BackColorButton) count ++;
if(!TableButton) count ++;
if(!FormButton) count ++;
if(!ImageButton) count ++;
if(!SymbolButton) count ++;
if(!PropertiesButton) count ++;
if(!CleanHTMLButton) count ++;
if(!TextBoxButton) count ++;
if(!AbsolutePositionButton) count ++;
if(!HasCustomInserts) count ++;
if(!GuidelinesButton) count ++;
return count;
}
}
#endregion
#region instance use variables
protected static ResourceManager LocRM;
#endregion
private const string CRLF = "\r\n";
///
/// Initializes a new instance of the DevEdit control.
///
public DevEdit():base()
{
this.EnableViewState = true;
this.Height = new Unit("300px");
this.Width = new Unit("750px");
}
///
/// Initializes a new instance of the DevEdit control and sets the initial value of the control.
///
/// Starting Value HTML
public DevEdit(string Value):this()
{
this.Value = Value;
}
#region render functions
protected override void OnPreRender(System.EventArgs e)
{
this.Page.RegisterClientScriptBlock("ewp_Style","");
#region not needed in v4.0
// if(!Page.IsClientScriptBlockRegistered("ew_attributes"))
// this.Page.RegisterClientScriptBlock("ew_attributes", "");
// if(!Page.IsClientScriptBlockRegistered("ew_xml"))
// this.Page.RegisterClientScriptBlock("ew_xml", "");
// if(!Page.IsClientScriptBlockRegistered("ew_stringbuilder"))
// this.Page.RegisterClientScriptBlock("ew_stringbuilder", "");
#endregion
if(this.FontListItemsArray == null)
this.FontListItemsArray = new string[] {"Times New Roman", "Arial", "Verdana", "Tahoma", "Courier New", "Georgia"};
if(this.SizeListItemsArray == null)
this.SizeListItemsArray = new string[] {"1", "2", "3", "4", "5", "6", "7"};
}
///
/// Render this control to the output parameter specified.
///
/// The HtmlTextWriter to write out to (usually Response stream)
/// This function is called as part of normal control rendering.
protected override void Render(HtmlTextWriter output)
{
//Make sure that we are within a