adding default text

May 17, 2010 at 6: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 7:55 PM
Edited May 17, 2010 at 8:19 PM

Hello,

To add text via server side you would use:

RichTextBox.text = "";

 

Jul 1, 2010 at 12:03 PM

Hi,

 I use Vb.net & 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.

 

CType

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