adding default text

May 17, 2010 at 7:46 PM

how do i add default values into rte - for example when the page loads the textarea already has text in there such as "add text here" etc.?

May 17, 2010 at 8:55 PM
Edited May 17, 2010 at 9:19 PM


To add text via server side you would use:

RichTextBox.text = "";


Jul 1, 2010 at 1:03 PM


 I use & use the editor with a master page.

 I store the HTML saved when staff create news items using the editor in an SQL database table. When this news item gets selected to be edited I use the following code to retrieve & therefore prepoplulate the editor (below). If you just change it to .Text = "What ever you want as default", that will appear instead. cmdGetHTML.ExecuteScalar() is executing the SQL command.



(Rte1.FindControl("editor"), System.Web.UI.WebControls.TextBox).Text = cmdGetHTML.ExecuteScalar().ToString.Replace(vbCrLf, "<br />")